diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2020-01-05 22:54:04 +0000 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2020-01-06 00:34:02 +0000 |
commit | c2501e4994efd9f561e67cc69b5b001fe77ce346 (patch) | |
tree | 2311b1baed359930bd0f9feaf17421b9f5798142 /doc/source/reference/c-api | |
parent | b5739e8a81c71174b75cf4c8f9de4eccaa7eca2c (diff) | |
download | numpy-c2501e4994efd9f561e67cc69b5b001fe77ce346.tar.gz |
MAINT: Improve const-correctness of shapes and strides
Marking these arguments as const makes it easier to reason about these functions, and prevent accidental mutation.
The C99 standard (6.2.5/26 "Types") guarantees that ABI compatibility is preserved here.
Diffstat (limited to 'doc/source/reference/c-api')
-rw-r--r-- | doc/source/reference/c-api/array.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/source/reference/c-api/array.rst b/doc/source/reference/c-api/array.rst index c910efa60..2eaf3a27a 100644 --- a/doc/source/reference/c-api/array.rst +++ b/doc/source/reference/c-api/array.rst @@ -2514,7 +2514,7 @@ this useful approach to looping over an array. stride and that axis will be used. .. c:function:: PyObject *PyArray_BroadcastToShape( \ - PyObject* arr, npy_intp *dimensions, int nd) + PyObject* arr, npy_intp const *dimensions, int nd) Return an array iterator that is broadcast to iterate as an array of the shape provided by *dimensions* and *nd*. |