summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markusm@dug.com>2022-03-06 11:13:54 +0800
committerSebastian Berg <sebastian@sipsolutions.net>2022-05-14 12:38:52 +0200
commite667c68ffc6a5b0c0f093b9ac3b7d0dd8ad59669 (patch)
tree1965537aea34c88e4d3febe9648d996556a27c33 /doc
parent02d1204b0840d19b20c83a9d658ffc37f2eb39ac (diff)
downloadnumpy-e667c68ffc6a5b0c0f093b9ac3b7d0dd8ad59669.tar.gz
DOC: fix documentation for typedescr argument of PyArray_AsCArray
The PyArray_AsCArray API does not conform to the documentation and document that the call steals a reference to the PyArray_Descr argument.
Diffstat (limited to 'doc')
-rw-r--r--doc/source/reference/c-api/array.rst15
1 files changed, 6 insertions, 9 deletions
diff --git a/doc/source/reference/c-api/array.rst b/doc/source/reference/c-api/array.rst
index d2e873802..f22b41a85 100644
--- a/doc/source/reference/c-api/array.rst
+++ b/doc/source/reference/c-api/array.rst
@@ -2176,8 +2176,8 @@ Array Functions
^^^^^^^^^^^^^^^
.. c:function:: int PyArray_AsCArray( \
- PyObject** op, void* ptr, npy_intp* dims, int nd, int typenum, \
- int itemsize)
+ PyObject** op, void* ptr, npy_intp* dims, int nd, \
+ PyArray_Descr* typedescr)
Sometimes it is useful to access a multidimensional array as a
C-style multi-dimensional array so that algorithms can be
@@ -2207,14 +2207,11 @@ Array Functions
The dimensionality of the array (1, 2, or 3).
- :param typenum:
+ :param typedescr:
- The expected data type of the array.
-
- :param itemsize:
-
- This argument is only needed when *typenum* represents a
- flexible array. Otherwise it should be 0.
+ A :c:type:`PyArray_Descr` structure indicating the desired data-type
+ (including required byteorder). The call will steal a reference to
+ the parameter.
.. note::