[NumPy-Tickets] [NumPy] #1933: format strings: native size used instead of standard size
NumPy Trac
numpy-tickets@scipy....
Fri Aug 12 13:08:50 CDT 2011
#1933: format strings: native size used instead of standard size
--------------------+-------------------------------------------------------
Reporter: skrah | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: Other | Version: 1.6.0
Keywords: |
--------------------+-------------------------------------------------------
I think this array should fit into a buffer of size 4,
even on a 64-bit platform:
{{{
>>> import struct
>>> struct.calcsize('=l')
4
>>> ndarray(buffer=bytearray(4), shape=[1], dtype="=l")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: buffer is too small for requested array
>>> ndarray(buffer=bytearray(8), shape=[1], dtype="=l")
array([0])
}}}
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1933>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list