diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/multiarray/ctors.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c index 5900e2456..88ce1e221 100644 --- a/numpy/core/src/multiarray/ctors.c +++ b/numpy/core/src/multiarray/ctors.c @@ -1817,7 +1817,6 @@ PyArray_GetArrayParamsFromObject(PyObject *op, if (!writeable && PySequence_Check(op)) { int check_it, stop_at_string, stop_at_tuple; int type_num, type; - discovered_t is_object = DISCOVERED_OK; /* * Determine the type, using the requested data type if @@ -1866,6 +1865,7 @@ PyArray_GetArrayParamsFromObject(PyObject *op, ((*out_dtype)->names || (*out_dtype)->subarray)); *out_ndim = NPY_MAXDIMS; + discovered_t is_object = DISCOVERED_OK; if (discover_dimensions( op, out_ndim, out_dims, check_it, stop_at_string, stop_at_tuple, &is_object) < 0) { @@ -1883,9 +1883,8 @@ PyArray_GetArrayParamsFromObject(PyObject *op, } /* If object arrays are forced */ if (is_object != DISCOVERED_OK) { - if (is_object == DISCOVERED_RAGGED && requested_dtype == NULL) - { - /* 2019-Nov-1 1.18 */ + if (is_object == DISCOVERED_RAGGED && requested_dtype == NULL) { + /* NumPy 1.18, 2019-11-01 */ if (DEPRECATE("Creating an ndarray with automatic object " "dtype is deprecated, use dtype=object if you intended " "it, otherwise specify an exact dtype") < 0) |