diff options
author | Matti Picus <matti.picus@gmail.com> | 2019-05-19 09:34:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-19 09:34:58 +0300 |
commit | ecb402499dba2d105b2714a55259352c31a62bd5 (patch) | |
tree | bcf388f945fc2eb9d4c151f776e030a65fb7fed7 /numpy/lib/function_base.py | |
parent | db595a0c4064956d2f2f904ed4a76443322bb7e9 (diff) | |
parent | 7495de475c8c578a0c39b09bc55a88a93aa1985a (diff) | |
download | numpy-ecb402499dba2d105b2714a55259352c31a62bd5.tar.gz |
Merge branch 'master' into npy-2.1
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index cab680751..7fa51d683 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -1235,6 +1235,8 @@ def diff(a, n=1, axis=-1, prepend=np._NoValue, append=np._NoValue): a = asanyarray(a) nd = a.ndim + if nd == 0: + raise ValueError("diff requires input that is at least one dimensional") axis = normalize_axis_index(axis, nd) combined = [] |