Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
d70f54b0
Unverified
Commit
d70f54b0
authored
Jul 28, 2022
by
Hyunwook Choi
Committed by
GitHub
Jul 27, 2022
Browse files
docs: Missing semicolons (#4094)
Add semicolons to Memory view sample code
parent
b07975f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
docs/advanced/pycpp/numpy.rst
docs/advanced/pycpp/numpy.rst
+2
-2
No files found.
docs/advanced/pycpp/numpy.rst
View file @
d70f54b0
...
@@ -433,7 +433,7 @@ following:
...
@@ -433,7 +433,7 @@ following:
{ 2, 4 }, // shape (rows, cols)
{ 2, 4 }, // shape (rows, cols)
{ sizeof(uint8_t) * 4, sizeof(uint8_t) } // strides in bytes
{ sizeof(uint8_t) * 4, sizeof(uint8_t) } // strides in bytes
);
);
})
})
;
This approach is meant for providing a ``memoryview`` for a C/C++ buffer not
This approach is meant for providing a ``memoryview`` for a C/C++ buffer not
managed by Python. The user is responsible for managing the lifetime of the
managed by Python. The user is responsible for managing the lifetime of the
...
@@ -449,7 +449,7 @@ We can also use ``memoryview::from_memory`` for a simple 1D contiguous buffer:
...
@@ -449,7 +449,7 @@ We can also use ``memoryview::from_memory`` for a simple 1D contiguous buffer:
buffer, // buffer pointer
buffer, // buffer pointer
sizeof(uint8_t) * 8 // buffer size
sizeof(uint8_t) * 8 // buffer size
);
);
})
})
;
.. versionchanged:: 2.6
.. versionchanged:: 2.6
``memoryview::from_memory`` added.
``memoryview::from_memory`` added.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment