Re: [Numpy-discussion] Add pad_to_shape and pad_to_match for simpler padding if a target size is already known

2021-04-24 Thread Ralf Gommers
On Sat, Apr 24, 2021 at 6:25 PM czorio4 wrote: > Hello Ralf, > > Thanks for the feedback! > > Instead of the two separate arguments, would it be possible to define it > like: > > def pad_to(x, target, ...) > > where the `target` can be either a tuple or an ndarray (and/or some other > array-l

Re: [Numpy-discussion] Add pad_to_shape and pad_to_match for simpler padding if a target size is already known

2021-04-24 Thread czorio4
Hello Ralf, Thanks for the feedback! Instead of the two separate arguments, would it be possible to define it like: def pad_to(x, target, ...) where the `target` can be either a tuple or an ndarray (and/or some other array-like), and the function determines the shape based on what input typ

Re: [Numpy-discussion] Add pad_to_shape and pad_to_match for simpler padding if a target size is already known

2021-04-24 Thread Ralf Gommers
On Thu, Apr 15, 2021 at 11:54 AM czorio4 wrote: > Hello all, > > I'm only two weeks late with this message about my pull request > that adds functions that > allow the user to pad to a target shape, instead of adding a certain amount > to each axis. >