Accessing a Numeric 'c' array from numarray
Hi, I'm trying to make a C array from a Numeric "c" (Character) typecode array 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 tAny 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 createArray setattr(group, name, object) File "/home/falted/PyTables/pytables-0.3/tables/Group.py", line 355, in __setattr__ value._f_putObjectInTree(name, self) File "/home/falted/PyTables/pytables-0.3/tables/Leaf.py", line 71, in _f_putObjectInTree self.create() File "/home/falted/PyTables/pytables-0.3/tables/Array.py", line 83, in create self.createArray(self.object, self.title) File "/home/falted/PyTables/pytables-0.3/src/hdf5Extension.pyx", line 913, in createArray array = NA_InputArray(arr, numfmt2[arr.typecode()], C_ARRAY) libnumarray.error: getShape: sequence object nested more than MAXDIM deep. although I was passing only a Numeric 'c' with a rather small shape (10,16). 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 that possible by only using numarray C calls? Thanks, -- Francesc Alted
participants (1)
-
Francesc Alted