[NumPy-Tickets] [NumPy] #1388: Bizarre errors after numpy.frombuffer with zero-length buffer
NumPy Trac
numpy-tickets@scipy....
Wed Feb 3 01:37:12 CST 2010
#1388: Bizarre errors after numpy.frombuffer with zero-length buffer
--------------------+-------------------------------------------------------
Reporter: baffe | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone:
Component: Other | Version: 1.4.0
Keywords: |
--------------------+-------------------------------------------------------
After calling numpy.frombuffer with a zero-length str or array.array,
numpy starts behaving very strange.
Example:
{{{
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> buf = numpy.frombuffer('', 'B')
>>> print numpy.array([42], 'B')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: data type not understood
>>> print numpy.array([42], 'B') # Exact same line again!
[1]
}}}
Leftover error that should have been raised by the previous operation?
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1388>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list