Numeric & map() ?

ingo ingoogni at home.nl
Mon Dec 18 14:12:34 EST 2000


When using an array as a sequence in the map() an axis of the array got 
lost.

from Numeric import *
def Func(Data3d):
    print Data3d.shape

Arr=reshape(arange(27),(3,3,3))
print Arr.shape

a=map(Func,Arr)

result:
(3,3,3)
(3,3)
(3,3)
(3,3)

To me, being quite new with all this, it's somewhat unexpected. What is 
happening and how do I get the third axis back?

TIA,

Ingo



More information about the Python-list mailing list