[issue11673] RawArray does not accept long

Robert Kern report at bugs.python.org
Fri Mar 25 21:44:16 CET 2011


Robert Kern <robert.kern at gmail.com> added the comment:

The practical case I was thinking of was numpy integer scalar types, which can crop up without explicitly requesting them, much like the long type.

Although, now that I check, I see that single-element numpy arrays also pass index(). Ideally, there would be two functions, one that takes sizes and one that takes sequences, much like numpy has array() and empty().

I can revert my patch to doing the isinstance(x, (int, long)) test as a quick fix. That will allow most of the numpy scalar types that I expect will actually be encountered.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11673>
_______________________________________


More information about the Python-bugs-list mailing list