There was an error while loading. Please reload this page.
1 parent 3901c99 commit 637f7ffCopy full SHA for 637f7ff
1 file changed
Doc/c-api/buffer.rst
@@ -161,10 +161,14 @@ a buffer, see :c:func:`PyObject_GetBuffer`.
161
If it is ``0``, :c:member:`~Py_buffer.buf` points to a single item representing
162
a scalar. In this case, :c:member:`~Py_buffer.shape`, :c:member:`~Py_buffer.strides`
163
and :c:member:`~Py_buffer.suboffsets` MUST be ``NULL``.
164
+ The maximum number of dimensions is given by :c:macro:`PyBUF_MAX_NDIM`.
165
- The macro :c:macro:`PyBUF_MAX_NDIM` limits the maximum number of dimensions
166
- to 64. Exporters MUST respect this limit, consumers of multi-dimensional
167
- buffers SHOULD be able to handle up to :c:macro:`PyBUF_MAX_NDIM` dimensions.
+ .. :c:macro:: PyBUF_MAX_NDIM
+
168
+ The maximum number of dimensions the memory represents.
169
+ Exporters MUST respect this limit, consumers of multi-dimensional
170
+ buffers SHOULD be able to handle up to :c:macro:`!PyBUF_MAX_NDIM` dimensions.
171
+ Currently set to 64.
172
173
.. c:member:: Py_ssize_t *shape
174
0 commit comments