diff options
author | mattip <matti.picus@gmail.com> | 2019-11-25 14:36:09 -0800 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2019-11-25 14:36:09 -0800 |
commit | d4167c25d9c628e717a18a2f25279729f0d778fc (patch) | |
tree | 0bf5a8be4ced927f7d26bdf498f7aebc68fc5f27 | |
parent | 576fc474cc3e0442a3faed5ad08de08cb74febbc (diff) | |
download | numpy-d4167c25d9c628e717a18a2f25279729f0d778fc.tar.gz |
MAINT: fixes from review
-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) |