[Numpy-discussion] reshaping arrays

Sudheer Joseph sudheer.joseph at yahoo.com
Sat Mar 2 21:03:11 EST 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.python.org/pipermail/numpy-discussion/attachments/20130303/389c06f4/attachment.html>


More information about the NumPy-Discussion mailing list