Re: [Numpy-discussion] ENH: Proposal to add np.neighborwise in PR#9514

2017-08-06 Thread Juan Nunez-Iglesias
It’s nice that this is pure Python / NumPy vectorized, whereas generic_filter requires some compilation to get good performance. (Tim, although your implementation is nice and readable, it would have been very slow for any significant volumes.) However, my feeling is that this function is too s

Re: [Numpy-discussion] ENH: Proposal to add np.neighborwise in PR#9514

2017-08-05 Thread Tim Cera
It you're into reading ancient history here is the link to the discussion where Zachary Pincus makes the same observation and my response was to close the PR because I could use scipy.ndimage.generic_filter, even though at least through my eyes, my implementation was nicer. http://numpy-discussion.

Re: [Numpy-discussion] ENH: Proposal to add np.neighborwise in PR#9514

2017-08-05 Thread Stefan van der Walt
On Fri, Aug 4, 2017, at 19:54, Tim Cera wrote: > As noted https://github.com/numpy/numpy/pull/303 a large part of this > functionality has been implemented before for numpy and didn't go > anywhere because it is already present in scipy.ndimage.> > IMHO it is better suited in numpy with a better n

Re: [Numpy-discussion] ENH: Proposal to add np.neighborwise in PR#9514

2017-08-04 Thread Tim Cera
As noted https://github.com/numpy/numpy/pull/303 a large part of this functionality has been implemented before for numpy and didn't go anywhere because it is already present in scipy.ndimage. IMHO it is better suited in numpy with a better name so that people don't miss it. Kindest regards, Tim

Re: [Numpy-discussion] ENH: Proposal to add np.neighborwise in PR#9514

2017-08-04 Thread Benjamin Root
So, this is a kernel mechanism? On Fri, Aug 4, 2017 at 6:31 PM, Joseph Fox-Rabinovitz < jfoxrabinov...@gmail.com> wrote: > I would like to propose the addition of a new function, > `np.neighborwise` in PR#9514. It is based on the discussion relating > to my proposal for `np.ratio` (PR#9481) and E

[Numpy-discussion] ENH: Proposal to add np.neighborwise in PR#9514

2017-08-04 Thread Joseph Fox-Rabinovitz
I would like to propose the addition of a new function, `np.neighborwise` in PR#9514. It is based on the discussion relating to my proposal for `np.ratio` (PR#9481) and Eric Wieser's `np.neighborwise` in PR#9428. This function accepts an array `a`, a vectorized function of two arguments `func`, and