[Numpy-discussion] bug in http://www.scipy.org/NumPy_for_Matlab_Users

Andrew Straw strawman at astraw.com
Sun Apr 29 15:39:22 EDT 2007


No, the nth index of a Python sequence is a[n], where n starts from 
zero. Thus, if I want the nth dimension of array a, I want a.shape[n].

I reverted the page to its original form and added a couple explanatory 
comments about zero vs one based indexing.

dmitrey wrote:
> now there is
> MATLAB            NDArray         Matrix
> size(a,n)                 a.shape[n]       a.shape[n]
> 
> but it should be
> size(a,n)                 a.shape[n-1]       a.shape[n-1]
> 
> WBR, D.
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion




More information about the NumPy-Discussion mailing list