[Numpy-tickets] [NumPy] #512: Incorrect conversion of None into a string for string arrays of size less than 4.
NumPy
numpy-tickets@scipy....
Wed May 16 01:42:36 CDT 2007
#512: Incorrect conversion of None into a string for string arrays of size less
than 4.
--------------------------------------+-------------------------------------
Reporter: socha | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: 1.1
Component: numpy.core | Version: none
Severity: normal | Resolution:
Keywords: None string array size 4 |
--------------------------------------+-------------------------------------
Changes (by oliphant):
* milestone: 1.0.3 Release => 1.1
Comment:
It looks like this is in discover_itemsize code in core/src/arrayobject.c
The problem is that when the itemsize is being determined for a string all
objects without a "length" are seen as 0-length.
Currently only a few object types are being checked for their length in
determining the itemsize to use for the array: strings, unicode strings,
and anything exposing the buffer interface.
While we could add another special-check for the None Object (and perhaps
the other singleton types) I don't see a compelling reason to start
changing this behavior.
--
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/512#comment:1>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list