[Numpy-discussion] flatnonzero fails with lists

Charles R Harris charlesr.harris at gmail.com
Tue Feb 25 01:15:17 EST 2014

On Mon, Feb 24, 2014 at 10:37 PM, Alan G Isaac <alan.isaac at gmail.com> wrote:

> I was surprised that `flatnonzero` fails with lists
> because it calls the `ravel` method, which they do not have,
> instead of using the `ravel` function.
> I do not know that there is any policy that NumPy
> functions should always work on lists,
> but I have gotten used to them doing so. So I'm just
> asking, is this intentional?  (version 1.7.1)
It's documented to take an ndarray, but I see no reason that it shouldn't
be modified to take array_like.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140224/247db9be/attachment.html>

More information about the NumPy-Discussion mailing list