Closed
Description
It appears that numpy.clip does not respect the out array order:
>>> import numpy as np
>>> np.__version__
'1.11.0'
>>> A = np.arange(15).reshape(5, 3)
>>> A
array([[ 0, 1, 2],
[ 3, 4, 5],
[ 6, 7, 8],
[ 9, 10, 11],
[12, 13, 14]])
>>> Af = np.zeros_like(A, order='F')
>>> Af
array([[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0]])
>>> np.clip(A, 0, 7, out=Af) # wrong
array([[0, 5, 7],
[1, 6, 7],
[2, 7, 7],
[3, 7, 7],
[4, 7, 7]])
>>> np.clip(A, 0, 7) # expected
array([[0, 1, 2],
[3, 4, 5],
[6, 7, 7],
[7, 7, 7],
[7, 7, 7]])