[SciPy-user] index arrangement standard

dmitrey openopt at ukr.net
Mon May 21 15:05:48 EDT 2007


BTW I think it would be nice to have possibility to set

ones(2,3) (=ones([2,3]))
zeros(2,3),
array(2,3,4,5) etc
However, this topic is better for numpy, not scipy mailing lists
Regards, D.

Trevis Crane wrote:
>
> Hi all,
>
> As I understand it, an m x n array has m rows, and n columns. So that
>
> ones([2,3])
>
> results in an array of ones that has two rows and three columns.
>
> Why, when we want to add a third dimension, does that index go first? 
> That is,
>
> ones([2,3,4])
>
> doesn’t give me 2 rows, 3 columns and 4 pages (what is the right word 
> for this?). Instead, I get 2 pages with 3 rows and 4 columns each. For 
> me this seems counterintuitive, but obviously it was designed like 
> this for a reason – what’s that reason?
>
> just curious,
>
> trevis
>
> ________________________________________________
>
> Trevis Crane
>
> Postdoctoral Research Assoc.
>
> Department of Physics
>
> University of Ilinois
>
> 1110 W. Green St.
>
> Urbana, IL 61801
>
> p: 217-244-8652
>
> f: 217-244-2278
>
> e: tcrane at uiuc.edu <mailto:tcrane at uiuc.edu>
>
> ________________________________________________
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>   




More information about the SciPy-User mailing list