Hi, I noticed a behaviour which I found counter-intuitive at least when using concatenate. I have a function which takes a numpy array of rank 2 as input, let's say foo(in):
a = N.randn((10, 2)) foo(a) To test a ctype implementation of foo against the python version, my test has something like X1 = N.linspace(-2, 2, 10)[:, N.newaxis] X2 = N.linspace(-1, 3, 10)[:, N.newaxis] a = N.concatenate(([X1, X2]), 1) which has Fortran storage (column major order), where as creating a as a = N.zeros((10, 2)) a[:,0] = N.linspace(-2, 2, 10) a[:,1] = N.linspace(-1, 3, 10) has C storage (row major order). What are the rules concerning storage with numpy ? I thought it was always C, except if stated explicitly. I can obviously understand why concatenate gives a Fortran order from an implementation point of view, but this looks kind of strange to me, David ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion