[Numpy-svn] [numpy/numpy] 8969da: BUG: Fixes #5184 gradient calculation behavior at ...
GitHub
noreply at github.com
Thu Oct 16 13:17:26 EDT 2014
Branch: refs/heads/master
Home: https://github.com/numpy/numpy
Commit: 8969da59ea9803b81b0dcb2fab3f41d4b168bc68
https://github.com/numpy/numpy/commit/8969da59ea9803b81b0dcb2fab3f41d4b168bc68
Author: David M Fobes <pseudocubic at gmail.com>
Date: 2014-10-16 (Thu, 16 Oct 2014)
Changed paths:
M numpy/lib/function_base.py
M numpy/lib/tests/test_function_base.py
Log Message:
-----------
BUG: Fixes #5184 gradient calculation behavior at boundaries
* Previous expected behavior was that the gradient is computed using central
differences in the interior and first differences at the boundaries.
* gradient was updated in v1.9.0 so that second-order accurate calculations are
done at the boundaries, but this breaks expected behavior with old code, so
`edge_order` keyword (Default: 1) is added to specify whether first or second
order calculations at the boundaries should be used.
* Since the second argument is *varargs, in order to maintain compatibility
with old code and compatibility with python 2.6 & 2.7, **kwargs is used, and
all kwargs that are not `edge_order` raise an error, listing the offending
kwargs.
* Tests and documentation updated to reflect this change.
* Added `.. versionadded:: 1.9.1` to the new optional kwarg `edge_order`
documentation, and specified supported `edge_order` kwarg values.
* Clarified documentation for `varargs`.
* Made indentation in docstring consistent with other docstring styles.
* Examples corrected
Commit: 4c0747d5c2cb3c961f7246cd9222b89bdcf2ce42
https://github.com/numpy/numpy/commit/4c0747d5c2cb3c961f7246cd9222b89bdcf2ce42
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2014-10-16 (Thu, 16 Oct 2014)
Changed paths:
M numpy/lib/function_base.py
M numpy/lib/tests/test_function_base.py
Log Message:
-----------
Merge pull request #5186 from pseudocubic/gradient-boundary-order-keyword
BUG: Fixes #5184 gradient calculation behavior at boundaries
Compare: https://github.com/numpy/numpy/compare/51f0976c1ca1...4c0747d5c2cb
More information about the Numpy-svn
mailing list