[Numpy-discussion] ndarray is not a sequence
Anthony Scopatz
scopatz at gmail.com
Fri Feb 28 00:49:59 EST 2014
Hello All,
The semantics of this seem quite insane to me:
In [1]: import numpy as np
In [2]: import collections
In [4]: isinstance(np.arange(5), collections.Sequence)
Out[4]: False
In [6]: np.version.full_version
Out[6]: '1.9.0.dev-eb40f65'
Is there any possibility that ndarray could inherit (in the last place)
from collections.Sequence? It seems like this would only be a 1 - 5 line
fix somewhere. I just spent a few hours tracking down a bug related to
this. Thanks for considering!
Be Well
Anthony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140227/0ffd4893/attachment.html>
More information about the NumPy-Discussion
mailing list