Re: [Numpy-discussion] Adding 'where' to ufunc methods?

2015-04-01 Thread Nathaniel Smith
On Apr 1, 2015 12:55 PM, wrote: > > On Wed, Apr 1, 2015 at 3:47 PM, Nathaniel Smith wrote: > > On Wed, Apr 1, 2015 at 11:34 AM, Jaime Fernández del Río > > wrote: > >> This question on StackOverflow: > >> > >> http://stackoverflow.com/questions/29394377/minimum-of-numpy-array-ignoring-diagonal >

Re: [Numpy-discussion] Adding 'where' to ufunc methods?

2015-04-01 Thread josef.pktd
On Wed, Apr 1, 2015 at 3:47 PM, Nathaniel Smith wrote: > On Wed, Apr 1, 2015 at 11:34 AM, Jaime Fernández del Río > wrote: >> This question on StackOverflow: >> >> http://stackoverflow.com/questions/29394377/minimum-of-numpy-array-ignoring-diagonal >> >> Got me thinking that I had finally found a

Re: [Numpy-discussion] Adding 'where' to ufunc methods?

2015-04-01 Thread Nathaniel Smith
On Wed, Apr 1, 2015 at 11:34 AM, Jaime Fernández del Río wrote: > This question on StackOverflow: > > http://stackoverflow.com/questions/29394377/minimum-of-numpy-array-ignoring-diagonal > > Got me thinking that I had finally found a use for the 'where' kwarg of > ufuncs. Unfortunately it is only

Re: [Numpy-discussion] Adding 'where' to ufunc methods?

2015-04-01 Thread Benjamin Root
Another usecase would be for MaskedArrays. ma.masked_array.min() wouldn't have to make a copy anymore (there is a github issue about that). It could just pass its mask into the where= argument of min() and be done with it. Problem would be generalizing situations where where= effectively results in

[Numpy-discussion] Adding 'where' to ufunc methods?

2015-04-01 Thread Jaime Fernández del Río
This question on StackOverflow: http://stackoverflow.com/questions/29394377/minimum-of-numpy-array-ignoring-diagonal Got me thinking that I had finally found a use for the 'where' kwarg of ufuncs. Unfortunately it is only provided for the ufunc itself, but not for any of its methods. Is there an