From: Nadav H. <na...@vi...> - 2006-07-11 04:33:42
|
Do you mean: >> map(shape, data) -----Original Message----- From: num...@li... on behalf of Nils = Wagner Sent: Mon 10-Jul-06 12:26 To: num...@li... Cc:=09 Subject: [Numpy-discussion] Converting a list Hi all, I have a list consisting of arrays of different size data =3D [array([-1. +0.j, -1.33333333+0.j, -1.66666667+0.j]), array([-2.+0.j , -2.-0.66666667j, -2.-1.33333333j]), array([-2. -2.j, -1.33333333-2.j, -0.66666667-2.j]), array([ 0.-2.j , 0.-1.66666667j, 0.-1.33333333j]), array([=20 6.12323400e-17-1.j , -2.58819045e-01-0.96592583j, -5.00000000e-01-0.8660254j , -7.07106781e-01-0.70710678j, -8.66025404e-01-0.5j , -9.65925826e-01-0.25881905j])] type(data) =3D <type 'list'> shape(data) results in shape(data) =3D Traceback (most recent call last): File "sinai.py", line 107, in ? p =3D polygon(P) File "sinai.py", line 67, in polygon print 'shape(data) =3D ',shape(data) File "/usr/lib64/python2.4/site-packages/numpy/core/fromnumeric.py", line 258, in shape result =3D asarray(a).shape File "/usr/lib64/python2.4/site-packages/numpy/core/numeric.py", line 119, in asarray return array(a, dtype, copy=3DFalse, order=3Dorder) TypeError: a float is required Is this a bug ? Nils -------------------------------------------------------------------------= Using Tomcat but need to do more? Need to support web services, = security? Get stuff done quickly with pre-integrated technology to make your job = easier Download IBM WebSphere Application Server v.1.0.1 based on Apache = Geronimo http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 _______________________________________________ Numpy-discussion mailing list Num...@li... https://lists.sourceforge.net/lists/listinfo/numpy-discussion |