summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2018-09-09 00:33:24 +0300
committermattip <matti.picus@gmail.com>2018-09-09 07:54:31 +0300
commit0346b1b04e3503df25937c239af2a1806e652963 (patch)
tree6a4feb8b96257e92b8f71f059c698df4f32ab244
parent639004c38b96966fb411d5864323278ce6d07aba (diff)
downloadnumpy-0346b1b04e3503df25937c239af2a1806e652963.tar.gz
DOC: dtype offset is limited to int
-rw-r--r--doc/source/reference/arrays.dtypes.rst7
-rw-r--r--numpy/core/_add_newdocs.py1
2 files changed, 5 insertions, 3 deletions
diff --git a/doc/source/reference/arrays.dtypes.rst b/doc/source/reference/arrays.dtypes.rst
index d771f2940..f2072263f 100644
--- a/doc/source/reference/arrays.dtypes.rst
+++ b/doc/source/reference/arrays.dtypes.rst
@@ -391,8 +391,8 @@ Type strings
When the optional keys *offsets* and *titles* are provided,
their values must each be lists of the same length as the *names*
and *formats* lists. The *offsets* value is a list of byte offsets
- (integers) for each field, while the *titles* value is a list of
- titles for each field (:const:`None` can be used if no title is
+ (limited to `ctypes.c_int`) for each field, while the *titles* value is a
+ list of titles for each field (:const:`None` can be used if no title is
desired for that field). The *titles* can be any :class:`string`
or :class:`unicode` object and will add another entry to the
fields dictionary keyed by the title and referencing the same
@@ -402,7 +402,8 @@ Type strings
The *itemsize* key allows the total size of the dtype to be
set, and must be an integer large enough so all the fields
are within the dtype. If the dtype being constructed is aligned,
- the *itemsize* must also be divisible by the struct alignment.
+ the *itemsize* must also be divisible by the struct alignment. Total dtype
+ *itemsize* is limited to `ctypes.c_int`.
.. admonition:: Example
diff --git a/numpy/core/_add_newdocs.py b/numpy/core/_add_newdocs.py
index 9ebd12cbd..e1e546c52 100644
--- a/numpy/core/_add_newdocs.py
+++ b/numpy/core/_add_newdocs.py
@@ -6457,6 +6457,7 @@ add_newdoc('numpy.core.multiarray', 'dtype', ('fields',
(dtype, offset[, title])
+ Offset is limited to C int, which is signed and usually 32 bits.
If present, the optional title can be any object (if it is a string
or unicode then it will also be a key in the fields dictionary,
otherwise it's meta-data). Notice also that the first two elements