Re: [Numpy-discussion] Is there a defined way to "unpad" an array, and if not, should there be?

2021-04-13 Thread Ralf Gommers
On Tue, Apr 13, 2021 at 3:37 AM Jeff Gostick wrote: > It is great to hear that this might be useful. I would LOVE to create a > PR on this idea and contribute back to numpy...but let's not get ahead of > ourselves :-) > > Regarding the name, I kinda like "unpad" since it relates directly to > "p

Re: [Numpy-discussion] Is there a defined way to "unpad" an array, and if not, should there be?

2021-04-13 Thread Eric Wieser
Some other options here that avoid the need for a new function: * Add a `return_view` argument to `pad`, such that for `padded, orig = np.pad(arr, ..., return_view=True)`, `orig == arr` and `orig.base is padded`. This is useful if `padded` is modified in place, but less useful otherwise. It has th

Re: [Numpy-discussion] Is there a defined way to "unpad" an array, and if not, should there be?

2021-04-13 Thread Evgeni Burovski
Prior art data point: scikit-image.util.crop : https://scikit-image.org/docs/dev/api/skimage.util.html#skimage.util.crop вт, 13 апр. 2021 г., 11:37 Eric Wieser : > Some other options here that avoid the need for a new function: > > * Add a `return_view` argument to `pad`, such that for `padded

[Numpy-discussion] NumPy Community Meeting Wednesday

2021-04-13 Thread Sebastian Berg
Hi all, There will be a NumPy Community meeting Wednesday April 14th at 20:00 UTC. Everyone is invited and encouraged to join in and edit the work-in-progress meeting topics and notes at: https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg?both Best wishes Sebastian signature.asc Description: This is a