Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2.3k
fix(types): remove newlines from docstring signature#4735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
c89e5b2214b20099cd8d0f795b7e9640613293e6e2d8e7d2d418bdef4521195d47aa397a9382a15196d15d7e555a2d675f035a04419a8d51122e15ae6be9d51b5a3d74c844d59918f2225c96570ea0a13a2add0d1a9dd7bd53892c9cefda868c5643d3885dab391386File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -330,6 +330,23 @@ TEST_SUBMODULE(eigen_matrix, m) { | ||
| m.def("dense_c", [mat]() -> DenseMatrixC { return DenseMatrixC(mat); }); | ||
| m.def("dense_copy_r", [](const DenseMatrixR &m) -> DenseMatrixR { return m; }); | ||
| m.def("dense_copy_c", [](const DenseMatrixC &m) -> DenseMatrixC { return m; }); | ||
| // test_defaults | ||
| bool have_numpy = true; | ||
| try { | ||
| py::module_::import("numpy"); | ||
Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Awesome that this works on all platforms. But this is a very large Could you please try if it still works like this: | ||
| } catch (const py::error_already_set &) { | ||
| have_numpy = false; | ||
| } | ||
| if (have_numpy) { | ||
| py::module_::import("numpy"); | ||
| Eigen::Matrix<double, 3, 3> defaultMatrix = Eigen::Matrix3d::Identity(); | ||
| m.def( | ||
| "defaults_mat", [](const Eigen::Matrix3d &) {}, py::arg("mat") = defaultMatrix); | ||
| Eigen::VectorXd defaultVector = Eigen::VectorXd::Ones(32); | ||
| m.def( | ||
| "defaults_vec", [](const Eigen::VectorXd &) {}, py::arg("vec") = defaultMatrix); | ||
| } | ||
| // test_sparse, test_sparse_signature | ||
| m.def("sparse_r", [mat]() -> SparseMatrixR { | ||
| // NOLINTNEXTLINE(clang-analyzer-core.uninitialized.UndefReturn) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please sprinkle
\r,\f,\vinto the tests below?What we want is that a test fails if any of the characters here is accidentally lost. (Imagine a silly typo slipping in while refactoring.)