summaryrefslogtreecommitdiff
path: root/doc/release
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2019-06-01 01:12:30 -0700
committerEric Wieser <wieser.eric@gmail.com>2019-06-01 10:52:25 -0700
commit458b5bd38aa50d4c903ff1117ea811a29f774709 (patch)
tree724be8e350f41c6072241815338dcff4ea1dbd52 /doc/release
parent392866d1c8dce0abb8cb327a42f8e134f5d2a05e (diff)
downloadnumpy-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/release')
-rw-r--r--doc/release/1.17.0-notes.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/release/1.17.0-notes.rst b/doc/release/1.17.0-notes.rst
index 3194867f9..5d43dc334 100644
--- a/doc/release/1.17.0-notes.rst
+++ b/doc/release/1.17.0-notes.rst
@@ -127,6 +127,16 @@ or ``np.nan``) is now dropped.
C API changes
=============
+dimension or stride input arguments are now passed by ``npy_intp const*``
+-------------------------------------------------------------------------
+Previously these function arguments were declared as the more strict
+``npy_intp*``, which prevented the caller passing constant data.
+This change is backwards compatible, but now allows code like::
+
+ npy_intp const fixed_dims[] = {1, 2, 3};
+ // no longer complains that the const-qualifier is discarded
+ npy_intp size = PyArray_MultiplyList(fixed_dims, 3);
+
New Features
============