@@ -1817,7 +1817,6 @@ PyArray_GetArrayParamsFromObject(PyObject *op,
1817
1817
if (!writeable && PySequence_Check (op )) {
1818
1818
int check_it , stop_at_string , stop_at_tuple ;
1819
1819
int type_num , type ;
1820
- discovered_t is_object = DISCOVERED_OK ;
1821
1820
1822
1821
/*
1823
1822
* Determine the type, using the requested data type if
@@ -1866,6 +1865,7 @@ PyArray_GetArrayParamsFromObject(PyObject *op,
1866
1865
((* out_dtype )-> names || (* out_dtype )-> subarray ));
1867
1866
1868
1867
* out_ndim = NPY_MAXDIMS ;
1868
+ discovered_t is_object = DISCOVERED_OK ;
1869
1869
if (discover_dimensions (
1870
1870
op , out_ndim , out_dims , check_it ,
1871
1871
stop_at_string , stop_at_tuple , & is_object ) < 0 ) {
@@ -1883,9 +1883,8 @@ PyArray_GetArrayParamsFromObject(PyObject *op,
1883
1883
}
1884
1884
/* If object arrays are forced */
1885
1885
if (is_object != DISCOVERED_OK ) {
1886
- if (is_object == DISCOVERED_RAGGED && requested_dtype == NULL )
1887
- {
1888
- /* 2019-Nov-1 1.18 */
1886
+ if (is_object == DISCOVERED_RAGGED && requested_dtype == NULL ) {
1887
+ /* NumPy 1.18, 2019-11-01 */
1889
1888
if (DEPRECATE ("Creating an ndarray with automatic object "
1890
1889
"dtype is deprecated, use dtype=object if you intended "
1891
1890
"it, otherwise specify an exact dtype" ) < 0 )
0 commit comments