summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2020-10-10 09:51:52 -0600
committerGitHub <noreply@github.com>2020-10-10 09:51:52 -0600
commitf0171ba7643060cf7cf05a27e24ce66f09d5a9e9 (patch)
tree03a57a0098467c45d72630a5159ef6e7efa586a2
parent2866c83df6f080393f9fe2110039d1ca272232fc (diff)
parent9c2ae9e7147abf2d50d4555a580ec539330a3af3 (diff)
downloadnumpy-f0171ba7643060cf7cf05a27e24ce66f09d5a9e9.tar.gz
Merge pull request #17527 from takanori-pskq/i13114-fix-npy-bool
DOC: Fix Boolean types in C functions
-rw-r--r--doc/source/reference/c-api/array.rst12
-rw-r--r--doc/source/reference/c-api/types-and-structures.rst6
2 files changed, 9 insertions, 9 deletions
diff --git a/doc/source/reference/c-api/array.rst b/doc/source/reference/c-api/array.rst
index 9fe45d2de..7360c0985 100644
--- a/doc/source/reference/c-api/array.rst
+++ b/doc/source/reference/c-api/array.rst
@@ -999,7 +999,7 @@ argument must be a :c:type:`PyObject *<PyObject>` that can be directly interpret
Evaluates true if the data area of the ndarray *m* is **not** in
machine byte-order according to the array's data-type descriptor.
-.. c:function:: Bool PyArray_EquivTypes( \
+.. c:function:: npy_bool PyArray_EquivTypes( \
PyArray_Descr* type1, PyArray_Descr* type2)
Return :c:data:`NPY_TRUE` if *type1* and *type2* actually represent
@@ -1008,13 +1008,13 @@ argument must be a :c:type:`PyObject *<PyObject>` that can be directly interpret
:c:data:`NPY_LONG` and :c:data:`NPY_INT` are equivalent. Otherwise
return :c:data:`NPY_FALSE`.
-.. c:function:: Bool PyArray_EquivArrTypes( \
+.. c:function:: npy_bool PyArray_EquivArrTypes( \
PyArrayObject* a1, PyArrayObject * a2)
Return :c:data:`NPY_TRUE` if *a1* and *a2* are arrays with equivalent
types for this platform.
-.. c:function:: Bool PyArray_EquivTypenums(int typenum1, int typenum2)
+.. c:function:: npy_bool PyArray_EquivTypenums(int typenum1, int typenum2)
Special case of :c:func:`PyArray_EquivTypes` (...) that does not accept
flexible data types but may be easier to call.
@@ -1650,7 +1650,7 @@ Conversion
destination must be an integer multiple of the number of elements
in *val*.
-.. c:function:: PyObject* PyArray_Byteswap(PyArrayObject* self, Bool inplace)
+.. c:function:: PyObject* PyArray_Byteswap(PyArrayObject* self, npy_bool inplace)
Equivalent to :meth:`ndarray.byteswap<numpy.ndarray.byteswap>` (*self*, *inplace*). Return an array
whose data area is byteswapped. If *inplace* is non-zero, then do
@@ -2309,7 +2309,7 @@ Array Functions
Other functions
^^^^^^^^^^^^^^^
-.. c:function:: Bool PyArray_CheckStrides( \
+.. c:function:: npy_bool PyArray_CheckStrides( \
int elsize, int nd, npy_intp numbytes, npy_intp const* dims, \
npy_intp const* newstrides)
@@ -2959,7 +2959,7 @@ to.
:c:data:`NPY_MAXDIMS` which is interpreted correctly by the C-API
functions that take axis arguments.
-.. c:function:: int PyArray_BoolConverter(PyObject* obj, Bool* value)
+.. c:function:: int PyArray_BoolConverter(PyObject* obj, npy_bool* value)
Convert any Python object, *obj*, to :c:data:`NPY_TRUE` or
:c:data:`NPY_FALSE`, and place the result in *value*.
diff --git a/doc/source/reference/c-api/types-and-structures.rst b/doc/source/reference/c-api/types-and-structures.rst
index 8759af6a4..d22a3f03f 100644
--- a/doc/source/reference/c-api/types-and-structures.rst
+++ b/doc/source/reference/c-api/types-and-structures.rst
@@ -566,7 +566,7 @@ PyArrayDescr_Type and PyArray_Descr
This function should be called without holding the Python GIL, and
has to grab it for error reporting.
- .. c:member:: Bool nonzero(void* data, void* arr)
+ .. c:member:: npy_bool nonzero(void* data, void* arr)
A pointer to a function that returns TRUE if the item of
``arr`` pointed to by ``data`` is nonzero. This function can
@@ -1012,7 +1012,7 @@ PyArrayIter_Type and PyArrayIterObject
npy_intp factors[NPY_MAXDIMS];
PyArrayObject *ao;
char *dataptr;
- Bool contiguous;
+ npy_bool contiguous;
} PyArrayIterObject;
.. c:member:: int nd_m1
@@ -1062,7 +1062,7 @@ PyArrayIter_Type and PyArrayIterObject
This member points to an element in the ndarray indicated by the
index.
- .. c:member:: Bool contiguous
+ .. c:member:: npy_bool contiguous
This flag is true if the underlying array is
:c:data:`NPY_ARRAY_C_CONTIGUOUS`. It is used to simplify