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

Benjamin Root ben.root at ou.edu
Wed Apr 1 15:25:31 EDT 2015


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 "nowhere".

Cheers!
Ben Root

On Wed, Apr 1, 2015 at 2:34 PM, Jaime Fernández del Río <
jaime.frio at gmail.com> 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 provided for the ufunc itself, but not for
> any of its methods.
>
> Is there any fundamental reason these were not implemented back in the
> day? Any frontal opposition to having them now?
>
> Jaime
>
> --
> (\__/)
> ( O.o)
> ( > <) Este es Conejo. Copia a Conejo en tu firma y ayúdale en sus planes
> de dominación mundial.
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150401/70c94bec/attachment.html>


More information about the NumPy-Discussion mailing list