summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
authorRoss Barnowski <rossbar@berkeley.edu>2022-07-08 13:50:08 +0300
committerRoss Barnowski <rossbar@berkeley.edu>2022-07-08 13:50:08 +0300
commit14092a017a1703610916bb6af7107b6eddcf31f6 (patch)
treeb70bd6766e4a24f42197e6f131c1713e9fa2563d /doc/source
parent45b049dced8d846647546759598c9665a1398a92 (diff)
downloadnumpy-14092a017a1703610916bb6af7107b6eddcf31f6.tar.gz
DOC: Apply final wording suggestion.
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>.
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/reference/arrays.interface.rst14
1 files changed, 9 insertions, 5 deletions
diff --git a/doc/source/reference/arrays.interface.rst b/doc/source/reference/arrays.interface.rst
index 2f843d2af..904d0132b 100644
--- a/doc/source/reference/arrays.interface.rst
+++ b/doc/source/reference/arrays.interface.rst
@@ -125,11 +125,15 @@ This approach to the interface consists of the object having an
**Default**: ``[('', typestr)]``
**data** (optional)
- A 2-tuple whose first argument is a signed integer (capable of
- holding a pointer to ``void`` such as the C/C++ type
- `intptr_t <https://en.cppreference.com/w/cpp/types/integer>`__)
- that points to the data-area storing the array
- contents. This pointer must point to the first element of
+ A 2-tuple whose first argument is a :doc:`Python integer <c-api/long>`
+ that points to the data-area storing the array contents.
+
+ .. note::
+ When converting from C/C++ via ``PyLong_From*`` or high-level
+ bindings such as Cython or pybind11, make sure to use an integer
+ of sufficiently large bitness.
+
+ This pointer must point to the first element of
data (in other words any offset is always ignored in this
case). The second entry in the tuple is a read-only flag (true
means the data area is read-only).