diff options
| -rw-r--r-- | numpy/core/src/multiarray/ctors.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c index e1989bab8..319e17a46 100644 --- a/numpy/core/src/multiarray/ctors.c +++ b/numpy/core/src/multiarray/ctors.c @@ -2966,6 +2966,7 @@ PyArray_Arange(double start, double stop, double step, int type_num) if (_safe_ceil_to_intp((stop - start)/step, &length)) { PyErr_SetString(PyExc_OverflowError, "arange: overflow while computing length"); + return NULL; } if (length <= 0) { |
