mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-19 22:39:09 +00:00
correct stride in matrix example and test
This also matches the Eigen example for the row-major case. This also enhances one of the tests to trigger a failure (and fixes it in the PR). (This isn't really a flaw in pybind itself, but rather fixes wrong code in the test code and docs).
This commit is contained in:
committed by
Jason Rhinelander
parent
d2757d0440
commit
a22dd2d1df
@@ -41,7 +41,7 @@ completely avoid copy operations with Python expressions like
|
||||
py::format_descriptor<float>::format(), /* Python struct-style format descriptor */
|
||||
2, /* Number of dimensions */
|
||||
{ m.rows(), m.cols() }, /* Buffer dimensions */
|
||||
{ sizeof(float) * m.rows(), /* Strides (in bytes) for each index */
|
||||
{ sizeof(float) * m.cols(), /* Strides (in bytes) for each index */
|
||||
sizeof(float) }
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user