[Numpy-discussion] reshaping arrays

Sudheer Joseph sudheer.joseph@yahoo....
Sat Mar 2 20:03:11 CST 2013


Hi all,
        For a 3d array in matlab, I can do the below to reshape it before an eof analysis. Is there a way to do the same using numpy? Please help.

[nlat,nlon,ntim ]=size(ssh);
tssh=reshape(ssh,nlat*nlon,ntim);
and afterwards
eofout=[]
eofout=reshape(eof1,nlat,nlon,ntime)
with best regards,
Sudheer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20130303/389c06f4/attachment.html 


More information about the NumPy-Discussion mailing list