[Numpy-discussion] Conversion of matlab import containing objects into 3d array
Fri Feb 5 14:12:49 CST 2010
I'm trying to import data from a matlab file using scipy.io.loadmat.
One of the variables in the file imports as an array of shape (51,) of
dtype object, with each element being an array of shape (23,100) of
dtype float. How do I convert this array into a single array of dtype
float with shape (51,23,100)? objarr.astype(float), which I thought
might work (from ), gives me the error "ValueError: setting an
array element with a sequence.".
Many thanks for any help,
Post-doctoral research fellow
Neurobiology, University of Pittsburgh
More information about the NumPy-Discussion