Hi everyone, >>> import numpy as np
>>> np.__version__ '1.9.0' >>> np.gradient(np.array([[1, 2, 6], [3, 4, 5]], dtype=np.float)) [array([[ 2., 2., -1.], [ 2., 2., -1.]]), array([[-0.5, 2.5, 5.5], [ 1. , 1. , 1. ]])] On the other hand: >>> import numpy as np >>> np.__version__ '1.8.2' >>> np.gradient(np.array([[1, 2, 6], [3, 4, 5]], dtype=np.float)) [array([[ 2., 2., -1.], [ 2., 2., -1.]]), array([[ 1. , 2.5, 4. ], [ 1. , 1. , 1. ]])] For what it's worth, the 1.8 version of this function seems to be in agreement with the Matlab equivalent function ('gradient'): >> gradient([[1, 2, 6]; [3, 4, 5]]) ans = 1.0000 2.5000 4.0000 1.0000 1.0000 1.0000 This seems like a regression to me, but maybe it's an improvement? Cheers,
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion