bertiniteam / b2

Bertini 2.0: The redevelopment of Bertini in C++.
88 stars 34 forks source link

Feature/fix eigen pass by reference #185

Closed ofloveandhate closed 1 year ago

ofloveandhate commented 1 year ago

an attempt to get functions which return by pass by reference to be callable using numpy objects from python.

the workaround is super hacky. i hate it. the real solution is to actually use Eigen::Ref throughout the core. please make that change (it's not trivial).

ofloveandhate commented 1 year ago

the unit tests in python all pass now. there's probably a lot of uncovered code, though, so my guess is there's still a fair amount of functions that need to be wrapped. (they wouldn't need wrapping if they use used Eigen::Ref to start with.

ofloveandhate commented 1 year ago

i do want to add a note about Eigen::Ref. it doesn't allow resizing. So that's kinda fucked. But pass-by-reference DOES.