24 Jul
2010
24 Jul
'10
2:42 p.m.
Hi, If I create a structured array with vector columns:
array = np.array(zip([[1,2],[1,2],[1,3]]),dtype=[('a',float,2)])
array.dtype[0]
then examine the type of the column, I get: dtype(('float64',(2,))) Then, if I try and view the numerical type, I see:
array.dtype[0].type
array.dtype[0].subdtype[0]
I have to basically do dtype('float64') to get what I need. I seem to remember that this used not to be the case, and that even for vector columns, one could access array.dtype[0].type to get the numerical type. Is this a bug, or deliberate? Thanks, Thomas
4973
Age (days ago)
4987
Last active (days ago)
2 comments
2 participants
participants (2)
-
Thomas Robitaille
-
Travis Oliphant