2011/7/7 Jens Jørgen Mortensen <[email protected]>

> Hi!
>
> With numpy 1.5, I get this:
>
> >>> a = np.ones((2, 2))
> >>> (2 * a.T).strides
> (16, 8)
>
> With 1.6, I get this:
>
> >>> (2 * a.T).strides
> (8, 16)
>
> So, this means I can't count on new arrays being C-contiguous any more.
> I guess there is a good reason for this.
>
> Anyway, I just thought I would mention it here - maybe I'm not the only
> one making this assumption when passing ndarrays to C code.
>
>
Yes, I believe that assumption is no longer valid, although Mark can verify
the details of that. Essentially the axis can be reordered so as to provide
the most efficient memory access during the computation. In particular,
combinations of arrays in Fortran order are likely to produce arrays in
Fortran order.

Chuck
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to