8000 Corrected formatting of multiline code block · python/cpython@2f17681 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2f17681

Browse files
authored
Corrected formatting of multiline code block
Incorrect formatting can be seen here: https://docs.python.org/3/c-api/buffer.html#numpy-style-shape-and-strides
1 parent 35890ab commit 2f17681

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/c-api/buffer.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,10 @@ both :c:member:`~Py_buffer.shape` and :c:member:`~Py_buffer.strides` are *NULL*.
353353

354354
If :c:member:`~Py_buffer.strides` is *NULL*, the array is interpreted as
355355
a standard n-dimensional C-array. Otherwise, the consumer must access an
356-
n-dimensional array as follows:
356+
n-dimensional array as follows::
357357

358-
``ptr = (char *)buf + indices[0] * strides[0] + ... + indices[n-1] * strides[n-1]``
359-
``item = *((typeof(item) *)ptr);``
358+
ptr = (char *)buf + indices[0] * strides[0] + ... + indices[n-1] * strides[n-1]
359+
item = *((typeof(item) *)ptr);
360360

361361

362362
As noted above, :c:member:`~Py_buffer.buf` can point to any location within

0 commit comments

Comments
 (0)
0