[Numpy-discussion] embedded arrays
Thomas Hrabe
thrabe at burnham.org
Fri Jun 6 18:25:44 EDT 2008
Furthermore, I sometimes get a
Segmentation fault
Illegal instruction
and sometimes it works
It might be a memory leak, due to the segfault and the arbitrary behavior.?
Best
-----Ursprüngliche Nachricht-----
Von: numpy-discussion-bounces at scipy.org im Auftrag von Thomas Hrabe
Gesendet: Fr 06.06.2008 15:10
An: numpy-discussion at scipy.org
Betreff: [Numpy-discussion] embedded arrays
Hi all,
while writing a extension module in C++ for python & numpy, I find a strange error.
I can send and retrieve numpy arrays to and from my module.
But python stops if I do the following:
a = numpy.array([[1.1,2,3],[4,5,6]])
PM.put(a,'a') //send a to the module
b = PM.get('a') //get a identical copy from the module
print b
array([[ 1.1, 2. , 3. ],
[ 4. , 5. , 6. ]])
b.__class__
Out[36]: <type 'numpy.ndarray'>
perfect, until
a == b
the interpreter does not continue from here...
I can add values to to b, everything, but a == b simply crashes ...?
Does anybody have a clue for this problem?
Have a nice weekend,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 3107 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080606/0227a8a3/attachment.bin>
More information about the NumPy-Discussion
mailing list