From 38e5bad90699b88e54e9d067250a83f466e20d5d Mon Sep 17 00:00:00 2001 From: Andy Scholand Date: Tue, 15 Jan 2019 13:26:52 -0700 Subject: DOC: Update docstring of diff() to use 'i' not 'n' See issue https://github.com/numpy/numpy/issues/12742 --- numpy/lib/function_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/lib/function_base.py') diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index fa1f42252..b61a64b8e 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -1150,7 +1150,7 @@ def diff(a, n=1, axis=-1, prepend=np._NoValue, append=np._NoValue): """ Calculate the n-th discrete difference along the given axis. - The first difference is given by ``out[n] = a[n+1] - a[n]`` along + The first difference is given by ``out[i] = a[i+1] - a[i]`` along the given axis, higher differences are calculated by using `diff` recursively. -- cgit v1.2.1