[Matrix-SIG] ValueError: object too deep for desired array (??)
Heather Drury
heather@v1.wustl.edu
Tue, 21 Dec 1999 14:15:53 -0600 (CST)
Hi,
I'm getting the following error on trying to do an array copy:
File "volume.py", line 50, in __init__
self.VoxData3D [:, :, :] = data.astype ('b')
ValueError: Object too deep for desired array
The relevant code is shown below ("data" is the input array",
which in this case is 256x256x256):
self.xdim = data.shape [2]
self.ydim = data.shape [1]
self.zdim = data.shape [0]
self.VoxData3D = zeros ((self.zdim, self.ydim, self.xdim), 'b')
self.VoxData3D [:, :, :] = data.astype ('b')
self.VoxData = ravel (self.VoxData3D)
I can't seem to find anything in the doc about this...and since I'm
allocating the space with the "zeros" command, I don't understand
why the object is "too deep".
Any ideas?
Heather
--
Heather Drury heather@v1.wustl.edu
Washington University School of Medicine http://v1.wustl.edu
Department of Anatomy & Neurobiology Phone: 314-362-4325
660 S. Euclid, MS 8108 FAX: 314-747-4370
St. Louis, MO 63110-1093