Nymeric Question, from tuple to array
Scott Ransom
ransom at physics.mcgill.ca
Sat Feb 22 15:30:42 EST 2003
Maurice wrote:
> When I want to know the diemsnions I use data.shape.
> The output is a tuple how can I convert this to an array again.
> I tried shapeNew=array(data.shape,Int) but it doesn't work.
Use asarray()
shapeNew = asarray(data.shape)
Scott
--
Scott M. Ransom Address: McGill Univ. Physics Dept.
Phone: (514) 398-6492 3600 University St., Rm 338
email: ransom at physics.mcgill.ca Montreal, QC Canada H3A 2T8
GPG print: 06A9 9553 78BE 16DB 407B FFCA 9BFA B6FF FFD3 2989
More information about the Python-list
mailing list