Is there a way to view an N-dimensional array with a *homogeneous*
record dtype as an array of N+1 dimensions? An example will make it
clear:
import numpy
a = numpy.array([(1.0,2.0), (3.0,4.0)], dtype=[('A',float),('B',float)])
b = a.view(...) # do something magical
print b
array([[ 1., 2.],
[ 3., 4.]])
b[0,0] = 0.0
print a
[(0.0, 2.0) (3.0, 4.0)]
Thanks,
Alex