|
From: Francesc A. <fa...@ca...> - 2006-01-20 17:58:50
|
Hi,
I'm starting to write a series of torture test for numpy and (nested)
heterogeneous arrays. I've found a first problem that causes a
segfault:
In [7]: dtype=3D[('x', '<i4', (2,)), ('Info', [('value', '<c16'), ('y2', '<=
f8'),=20
('Info2', [('name', '|S2'), ('value', '<c16', (2,)), ('y3', '<f8', (2,)),=20
('z3', '<u4', (2,))]), ('name', '|S2'), ('z2', '|u1')]), ('color', '|S2'),=
=20
('info', [('Name', '|S2'), ('Value', '<c16')]), ('y', '<f8', (2, 2)), ('z',=
=20
'|u1')]
In [9]: a=3Dnumpy.zeros((2,), dtype=3Ddtype)
In [10]: a
Out[10]:
array([ (array([0, 0]), (0j, 0.0, ('', array([ 0.+0.j, 0.+0.j]), array([ 0=
=2E, =20
0.]), array([0, 0], dtype=3Duint32)), '', 0), '', ('', 0j), array([[ 0., 0=
=2E],
[ 0., 0.]]), 0),
(array([0, 0]), (0j, 0.0, ('', array([ 0.+0.j, 0.+0.j]), array([ 0.=
, =20
0.]), array([0, 0], dtype=3Duint32)), '', 0), '', ('', 0j), array([[ 0., 0=
=2E],
[ 0., 0.]]), 0)], dtype=3D(void,146))
This is good. Now:
In [13]: a=3Dnumpy.zeros((30,), dtype=3Ddtype)
In [14]: a
*** glibc detected *** free(): invalid pointer: 0xb7958680 ***
Out[14]: Aborted
If I find more things like this I'll report them.
Cheers,
=2D-=20
>0,0< Francesc Altet =A0 =A0 http://www.carabos.com/
V V C=E1rabos Coop. V. =A0=A0Enjoy Data
"-"
|