Skip to content

Reference to a Vector of Eigen Matrix #1056

Answered by wjakob
petrasvestartas asked this question in Q&A
Discussion options

You must be logged in to vote

Right, this is allowed. You can access a bound std::vector<> in C++ bindings and change the contents. But that same operation copies elements when done in Python. The rationale and a workaround (dangerous) is described in the reference documentation of nb::bind_vector.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@petrasvestartas
Comment options

@wjakob
Comment options

@petrasvestartas
Comment options

@wjakob
Comment options

Answer selected by petrasvestartas
@petrasvestartas
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants