After reshaping a Fortran array, the new array doesn't share data
with original array.
I will be glad if someone can explain the strange behaviour of this
program. Is it a numpy bug ?
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
def check_bug(order):
a = numpy.ndarray((3,2),order=order,dtype=int)
a[0,0] = 1
b = a.reshape((6,))
a[0,0] = 2
print b[0]
check_bug('C') # 2, good
check_bug('F') # 1, wrong ???
print(numpy.version.version) # 1.2.1
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--
FP
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion