[Numpy-tickets] [NumPy] #456: Inconsistent behaviour of representation of numpy scalar strings when NULLs exists
NumPy
numpy-tickets@scipy....
Tue Feb 27 21:37:38 CST 2007
#456: Inconsistent behaviour of representation of numpy scalar strings when NULLs
exists
------------------------+---------------------------------------------------
Reporter: faltet | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone:
Component: numpy.core | Version:
Severity: normal | Resolution:
Keywords: |
------------------------+---------------------------------------------------
Comment (by oliphant):
The problem is that the STRING_getitem() call uses PyString_FromString if
the last element of the string is the NULL character and
PyString_FromStringAndSize if it is not.
The tostring() method always uses PyString_FromStringAndSize.
Perhaps instead we should only truncate NULLs if there is a contiguous
chunk of them. What we are trying to avoid is printing NULLs for the very
common case of underfilled elements in a string array.
--
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/456#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