diff options
| author | Sebastian Berg <sebastian@sipsolutions.net> | 2022-05-14 14:53:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-14 14:53:53 +0200 |
| commit | bb20ef740fa97651631b1d0adf85ced7d0f6879d (patch) | |
| tree | af71d1cf20eaa44baa15384184304f79b548af79 | |
| parent | cfbbde8ae720ba4fc653aabe64f9acc3d4c48183 (diff) | |
| parent | e667c68ffc6a5b0c0f093b9ac3b7d0dd8ad59669 (diff) | |
| download | numpy-bb20ef740fa97651631b1d0adf85ced7d0f6879d.tar.gz | |
Merge pull request #21157 from mmohrhard/fix-pyarray_ascarray-doc
DOC: fix documentation for typedescr argument of PyArray_AsCArray
| -rw-r--r-- | doc/source/reference/c-api/array.rst | 15 |
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:: |
