maroba / findiff

Python package for numerical derivatives and partial differential equations in any number of dimensions.
MIT License
420 stars 60 forks source link

(doc) which scheme is chosen for which point #19

Closed Tigraan closed 1 year ago

Tigraan commented 4 years ago

As the derivative of a given numpy array has the same size as the initial array, it could be worth mentioning how the differentiation switches between the backwards/forwards/centered scheme.

Looking at operators.diff() it uses "center" whenever it can apply it, "forward" at the left (low-index) boundary and "backward" at the right (high-index) boundary, but the source code is not that easy to read, and it is not written anywhere in the doc either.

maroba commented 4 years ago

That is correct. I will update the documentation accordingly.