diff options
author | Jack J. Woehr <jwoehr@softwoehr.com> | 2019-10-18 15:25:03 -0600 |
---|---|---|
committer | Jack J. Woehr <jwoehr@softwoehr.com> | 2019-10-18 15:25:03 -0600 |
commit | cc3da40d52cb46a346bf429b8d76d7fd59e29887 (patch) | |
tree | 3a0cf76b27723817e5520d877df1685ce7f4223d /numpy/lib/function_base.py | |
parent | 4d4cc4dcf4feaa6c3162b0d07b0f687e477724ad (diff) | |
parent | c1f56c455252e4c2dd2535f0ce140125aff8ece2 (diff) | |
download | numpy-cc3da40d52cb46a346bf429b8d76d7fd59e29887.tar.gz |
Merge branch 'master' of https://github.com/numpy/numpy into einsum_c_buglet
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 46950bc95..3ad630a7d 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -1314,9 +1314,13 @@ def interp(x, xp, fp, left=None, right=None, period=None): Notes ----- - Does not check that the x-coordinate sequence `xp` is increasing. - If `xp` is not increasing, the results are nonsense. - A simple check for increasing is:: + The x-coordinate sequence is expected to be increasing, but this is not + explicitly enforced. However, if the sequence `xp` is non-increasing, + interpolation results are meaningless. + + Note that, since NaN is unsortable, `xp` also cannot contain NaNs. + + A simple check for `xp` being strictly increasing is:: np.all(np.diff(xp) > 0) @@ -1889,7 +1893,7 @@ class vectorize(object): typecode characters or a list of data type specifiers. There should be one data type specifier for each output. doc : str, optional - The docstring for the function. If `None`, the docstring will be the + The docstring for the function. If None, the docstring will be the ``pyfunc.__doc__``. excluded : set, optional Set of strings or integers representing the positional or keyword |