Hi all,

I don't think PyObject pointers should be accessible via the buffer interface. 
I'd throw an error, but maybe a (silenceable) warning would do. Would have 
saved me some bug-hunting.

>>> import numpy
>>> numpy.array([55, (33,)], dtype=object)
>>> x = numpy.array([55, (33,)], dtype=object)
>>> x
array([55, (33,)], dtype=object)
>>> buffer(x)
<read-only buffer for 0x8496f48, size -1, offset 0 at 0x850b060>
>>> str(buffer(x))
'\xb0\x1c\x17\x08l\x89\xd7\xb7'
>>> numpy.__version__
'1.1.0'

Opinions?

Andreas

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to