Skip to content

Commit 37cd05e

Browse files
committed
Fixed warning and updated docs
1 parent 2cf561b commit 37cd05e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

numpy/core/src/multiarray/array_coercion.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,7 @@ PyArray_AdaptDescriptorToArray(PyArrayObject *arr, PyObject *dtype)
857857
* (Initially it is a pointer to the user-provided head pointer).
858858
* @param fixed_DType User provided fixed DType class
859859
* @param flags Discovery flags (reporting and behaviour flags, see def.)
860+
* @param do_copy Specifies if a copy is to be made during array creation.
860861
* @return The updated number of maximum dimensions (i.e. scalars will set
861862
* this to the current dimensions).
862863
*/

numpy/core/src/multiarray/ctors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,7 @@ _array_from_array_like(PyObject *op,
13491349
*/
13501350
if (!writeable && tmp == Py_NotImplemented) {
13511351
PyObject* array_meth = PyArray_LookupSpecial_OnInstance(op, "__array__");
1352-
PyObject* has_get = array_meth && PyType_Check(op) && PyObject_HasAttrString(array_meth, "__get__");
1352+
int has_get = array_meth && PyType_Check(op) && PyObject_HasAttrString(array_meth, "__get__");
13531353
if (array_meth != NULL && !has_get && do_copy) {
13541354
PyErr_SetString(PyExc_ValueError, "Calling __array__ in never copy mode is not allowed.");
13551355
return NULL;

0 commit comments

Comments
 (0)