On 02/08/15 22:14, Kang Wang wrote: > Thank you all for replying! > > I did a quick test, using python 2.6.6, and the original numpy package > on my Linux computer without any change. > == > x = np.zeros((2,3),dtype=np.int32,order='F') > print "x.strides =" > print x.strides > > y = x + 1 > print "y.strides =" > print y.strides > == > > Output: > -------- > x.strides = > (4, 8) > y.strides = > (12, 4) > --------
Update NumPy. This is the behavior I talked about that has changed. Now NumPy does this: In [21]: x = np.zeros((2,3),dtype=np.int32,order='F') In [22]: y = x + 1 In [24]: x.strides Out[24]: (4, 8) In [25]: y.strides Out[25]: (4, 8) Sturla _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion