Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix denominator in docstring for mean_abs_change #870

Merged
merged 1 commit into from
Jul 4, 2021
Merged

Fix denominator in docstring for mean_abs_change #870

merged 1 commit into from
Jul 4, 2021

Conversation

abroekhof
Copy link
Contributor

Mean absolute change is over the differences of consecutive values, so the denominator should be n-1, not n. Numpy diff confirms this, e.g.

>>> x = np.array([1, 2, 4, 7, 0])
>>> np.diff(x)
array([ 1,  2,  3, -7])

Mean absolute change is over the differences of consecutive values, so the denominator should be `n-1`, not `n`. Numpy `diff` confirms this, e.g.

```
>>> x = np.array([1, 2, 4, 7, 0])
>>> np.diff(x)
array([ 1,  2,  3, -7])
```
@nils-braun
Copy link
Collaborator

Thanks @abroekhof! You are completely correct.

@nils-braun nils-braun merged commit c461b47 into blue-yonder:main Jul 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants