pybind / pybind11

Seamless operability between C++11 and Python
https://pybind11.readthedocs.io/
Other
15.77k stars 2.11k forks source link

Feature request: numpy csr_matrix without Eigen #1665

Open PhilipDeegan opened 5 years ago

PhilipDeegan commented 5 years ago

I've gotten something working

built like

used like

"check_" is forced to pass, so it's not ideal but it all seems to work anyway. I don't know what the conventions are here but I hope something like this could be merged eventually.

Ref:https://github.com/pybind/pybind11/issues/1022

PhilipDeegan commented 5 years ago

if someone could advise me how to construct the proxy objects for this that's be great

eloyfelix commented 4 years ago

this would indeed be a nice feature. @Dekken did you manage to do it? Your links don't work anymore.

PhilipDeegan commented 4 years ago

I have it working, I moved some things around.

https://github.com/Dekken/statick/blob/master/inc/statick/pybind/csr.hpp https://github.com/Dekken/statick/blob/master/inc/statick/pybind/numpy.hpp https://github.com/Dekken/statick/blob/master/inc/statick/pybind/linear_model.hpp#L23

Let me try isolate and clean things up.

eloyfelix commented 4 years ago

wow, that would be great. Many thanks!

@wjakob wouldn't this be a nice feature to add to pybind11 core?