diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2019-06-01 01:12:30 -0700 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2019-06-01 10:52:25 -0700 |
commit | 458b5bd38aa50d4c903ff1117ea811a29f774709 (patch) | |
tree | 724be8e350f41c6072241815338dcff4ea1dbd52 /doc/source/reference/c-api.iterator.rst | |
parent | 392866d1c8dce0abb8cb327a42f8e134f5d2a05e (diff) | |
download | numpy-458b5bd38aa50d4c903ff1117ea811a29f774709.tar.gz |
ENH: Pass input strides and dimensions by pointer to const
This makes it possible to call these functions with constant data.
It also bakes the contract that the data passed via these pointers will not be changed into the function signatures.
This is backwards compatible, because T* can always be passed to a function expecting T const*.
Diffstat (limited to 'doc/source/reference/c-api.iterator.rst')
-rw-r--r-- | doc/source/reference/c-api.iterator.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/source/reference/c-api.iterator.rst b/doc/source/reference/c-api.iterator.rst index 940452d3c..b602cd4c0 100644 --- a/doc/source/reference/c-api.iterator.rst +++ b/doc/source/reference/c-api.iterator.rst @@ -630,7 +630,7 @@ Construction and Destruction .. c:function:: NpyIter* NpyIter_AdvancedNew( \ npy_intp nop, PyArrayObject** op, npy_uint32 flags, NPY_ORDER order, \ NPY_CASTING casting, npy_uint32* op_flags, PyArray_Descr** op_dtypes, \ - int oa_ndim, int** op_axes, npy_intp* itershape, npy_intp buffersize) + int oa_ndim, int** op_axes, npy_intp const* itershape, npy_intp buffersize) Extends :c:func:`NpyIter_MultiNew` with several advanced options providing more control over broadcasting and buffering. @@ -867,7 +867,7 @@ Construction and Destruction } while (iternext2(iter2)); } while (iternext1(iter1)); -.. c:function:: int NpyIter_GotoMultiIndex(NpyIter* iter, npy_intp* multi_index) +.. c:function:: int NpyIter_GotoMultiIndex(NpyIter* iter, npy_intp const* multi_index) Adjusts the iterator to point to the ``ndim`` indices pointed to by ``multi_index``. Returns an error if a multi-index |