|
From: Stefan v. d. W. <st...@su...> - 2006-02-15 18:37:56
|
Using
In [3]: numpy.__version__
Out[3]: '0.9.5.2024'
I see the following:
In [4]: import numpy as N
In [5]: ctype =3D N.dtype({'names': ('x', 'y', 'z'), 'formats' : [N.float=
32, N.float32, N.float32]})
In [6]: ctype
Out[6]: dtype([('x', '<f4'), ('y', '<f4'), ('z', '<f4')])
In [7]: N.array([(1,2,3), (4,5,6)], dtype=3Dctype)
Segmentation fault
However, when I use a mutable list for defining dtype, i.e.
'names': ['x', 'y', 'z'] instead of
'names': ('x', 'y', 'z')
it works fine.
Is this expected behaviour?
Regards
St=E9fan
|