@@ -1555,7 +1555,7 @@ _prepend_ones(PyArrayObject *arr, int nd, int ndmin, NPY_ORDER order)
15551555static inline PyObject *
15561556_array_fromobject_generic (
15571557PyObject * op ,PyArray_Descr * in_descr ,PyArray_DTypeMeta * in_DType ,
1558- _PyArray_CopyMode copy ,NPY_ORDER order ,npy_bool subok ,int ndmin )
1558+ NPY_COPYMODE copy ,NPY_ORDER order ,npy_bool subok ,int ndmin )
15591559{
15601560PyArrayObject * oparr = NULL ,* ret = NULL ;
15611561PyArray_Descr * oldtype = NULL ;
@@ -1704,7 +1704,7 @@ array_array(PyObject *NPY_UNUSED(ignored),
17041704{
17051705PyObject * op ;
17061706npy_bool subok = NPY_FALSE ;
1707- _PyArray_CopyMode copy = NPY_COPY_ALWAYS ;
1707+ NPY_COPYMODE copy = NPY_COPY_ALWAYS ;
17081708int ndmin = 0 ;
17091709npy_dtype_info dt_info = {NULL ,NULL };
17101710NPY_ORDER order = NPY_KEEPORDER ;
@@ -1752,6 +1752,7 @@ array_asarray(PyObject *NPY_UNUSED(ignored),
17521752PyObject * const * args ,Py_ssize_t len_args ,PyObject * kwnames )
17531753{
17541754PyObject * op ;
1755+ NPY_COPYMODE copy = NPY_COPY_IF_NEEDED ;
17551756npy_dtype_info dt_info = {NULL ,NULL };
17561757NPY_ORDER order = NPY_KEEPORDER ;
17571758PyObject * like = Py_None ;
@@ -1762,6 +1763,7 @@ array_asarray(PyObject *NPY_UNUSED(ignored),
17621763"a" ,NULL ,& op ,
17631764"|dtype" ,& PyArray_DTypeOrDescrConverterOptional ,& dt_info ,
17641765"|order" ,& PyArray_OrderConverter ,& order ,
1766+ "$copy" ,& PyArray_CopyConverter ,& copy ,
17651767"$like" ,NULL ,& like ,
17661768NULL ,NULL ,NULL )< 0 ) {
17671769Py_XDECREF (dt_info .descr );
@@ -1783,7 +1785,7 @@ array_asarray(PyObject *NPY_UNUSED(ignored),
17831785 }
17841786
17851787PyObject * res = _array_fromobject_generic (
1786- op ,dt_info .descr ,dt_info .dtype ,NPY_FALSE ,order ,NPY_FALSE ,0 );
1788+ op ,dt_info .descr ,dt_info .dtype ,copy ,order ,NPY_FALSE ,0 );
17871789Py_XDECREF (dt_info .descr );
17881790Py_XDECREF (dt_info .dtype );
17891791return res ;