Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
13c08072
Commit
13c08072
authored
Feb 21, 2018
by
luz.paz
Committed by
Jason Rhinelander
Feb 27, 2018
Browse files
Typo
parent
01fada76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tests/test_eigen.cpp
tests/test_eigen.cpp
+1
-1
No files found.
tests/test_eigen.cpp
View file @
13c08072
...
@@ -124,7 +124,7 @@ TEST_SUBMODULE(eigen, m) {
...
@@ -124,7 +124,7 @@ TEST_SUBMODULE(eigen, m) {
// This one accepts a matrix of any stride:
// This one accepts a matrix of any stride:
m
.
def
(
"add_any"
,
[](
py
::
EigenDRef
<
Eigen
::
MatrixXd
>
x
,
int
r
,
int
c
,
double
v
)
{
x
(
r
,
c
)
+=
v
;
});
m
.
def
(
"add_any"
,
[](
py
::
EigenDRef
<
Eigen
::
MatrixXd
>
x
,
int
r
,
int
c
,
double
v
)
{
x
(
r
,
c
)
+=
v
;
});
// Return mutable references (numpy maps into eigen varibles)
// Return mutable references (numpy maps into eigen vari
a
bles)
m
.
def
(
"get_cm_ref"
,
[]()
{
return
Eigen
::
Ref
<
Eigen
::
MatrixXd
>
(
get_cm
());
});
m
.
def
(
"get_cm_ref"
,
[]()
{
return
Eigen
::
Ref
<
Eigen
::
MatrixXd
>
(
get_cm
());
});
m
.
def
(
"get_rm_ref"
,
[]()
{
return
Eigen
::
Ref
<
MatrixXdR
>
(
get_rm
());
});
m
.
def
(
"get_rm_ref"
,
[]()
{
return
Eigen
::
Ref
<
MatrixXdR
>
(
get_rm
());
});
// The same references, but non-mutable (numpy maps into eigen variables, but is !writeable)
// The same references, but non-mutable (numpy maps into eigen variables, but is !writeable)
...
...
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