From: Francesc A. <fa...@op...> - 2003-01-18 09:22:17
|
Hi, I'm trying to make a C array from a Numeric "c" (Character) typecode arra= y using the high level call: NA_InputArray(PyObject *numarray, NumarrayType t, int requires) with no success. As I have been able to access all the other types (i.e. '1','b','s','i','l','f','d') successfully, perhaps character type is not supported? In the NumarrayType enum, there is no tChar, but I've tried tUInt8 and tA= ny as the value for NumarrayType parameter, but both choices issues the same error: Traceback (most recent call last): File "table-tree2.py", line 77, in ? h5file.createArray('/columns', 'name', array(names), "Name column") File "/home/falted/PyTables/pytables-0.3/tables/File.py", line 400, in=20 createArray setattr(group, name, object) File "/home/falted/PyTables/pytables-0.3/tables/Group.py", line 355, in= =20 __setattr__ value._f_putObjectInTree(name, self) File "/home/falted/PyTables/pytables-0.3/tables/Leaf.py", line 71, in=20 _f_putObjectInTree self.create() File "/home/falted/PyTables/pytables-0.3/tables/Array.py", line 83, in=20 create self.createArray(self.object, self.title) File "/home/falted/PyTables/pytables-0.3/src/hdf5Extension.pyx", line 9= 13,=20 in createArray array =3D NA_InputArray(arr, numfmt2[arr.typecode()], C_ARRAY) libnumarray.error: getShape: sequence object nested more than MAXDIM deep= =2E although I was passing only a Numeric 'c' with a rather small shape (10,1= 6). I just want to access the buffer data, and the shape of this object from = C (well, I'm actually using Pyrex, but I think this is not important). Is t= hat possible by only using numarray C calls? Thanks, --=20 Francesc Alted |