The NumPy Fortran-ordering quiz

Travis Oliphant oliphant.travis at ieee.org
Wed Oct 18 13:19:08 EDT 2006


Charles R Harris wrote:
>
>
> On 10/17/06, *Charles R Harris* <charlesr.harris at gmail.com 
> <mailto:charlesr.harris at gmail.com>> wrote:
>
>
>
>     On 10/17/06, *A. M. Archibald* < peridot.faceted at gmail.com
>     <mailto:peridot.faceted at gmail.com>> wrote:
>
>         On 17/10/06, Charles R Harris <charlesr.harris at gmail.com
>         <mailto:charlesr.harris at gmail.com>> wrote:
>         >
>         >
>         > On 10/17/06, Travis Oliphant < oliphant.travis at ieee.org
>         <mailto:oliphant.travis at ieee.org>> wrote:
>
>
> <snip>
>
>     Which doesn't seem to be the case here. I am beginning to wonder
>     if we really need fortran order, seems that a few well chosen
>     interface routines would fill the need and avoid much confusion.
>
>
> For instance, it would be nice if flatten took an order keyword:
>
> In [107]: array([[1,2,3],[4,5,6]], dtype=int8, order='F').flatten()
> Out[107]: array([1, 2, 3, 4, 5, 6], dtype=int8)

It does take an argument (just not a keyword argument).  The general 
rule I followed (probably inappropriately) was that single-argument 
methods didn't need keywords. 

so

a.flatten('F')  gives you a Fortran-order flattening.

-Travis


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




More information about the NumPy-Discussion mailing list