We're current copy by creating an Eigen::Map into the input numpy array, then assigning that to the basic eigen type, effectively having Eigen do the copy. That doesn't work for negative strides, though: Eigen doesn't allow them. This commit makes numpy do the copying instead by allocating the eigen type, then having numpy copy from the input array into a numpy reference into the eigen object's data. This also saves a copy when type conversion is required: numpy can do the conversion on-the-fly as part of the copy. Finally this commit also makes non-reference parameters respect the convert flag, declining the load when called in a noconvert pass with a convertible, but non-array input or an array with the wrong dtype.
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| _static | Loading commit data... | |
| advanced | Loading commit data... | |
| Doxyfile | Loading commit data... | |
| Makefile | Loading commit data... | |
| basics.rst | Loading commit data... | |
| benchmark.py | Loading commit data... | |
| benchmark.rst | Loading commit data... | |
| changelog.rst | Loading commit data... | |
| classes.rst | Loading commit data... | |
| compiling.rst | Loading commit data... | |
| conf.py | Loading commit data... | |
| faq.rst | Loading commit data... | |
| index.rst | Loading commit data... | |
| intro.rst | Loading commit data... | |
| limitations.rst | Loading commit data... | |
| pybind11-logo.png | Loading commit data... | |
| pybind11_vs_boost_python1.png | Loading commit data... | |
| pybind11_vs_boost_python1.svg | Loading commit data... | |
| pybind11_vs_boost_python2.png | Loading commit data... | |
| pybind11_vs_boost_python2.svg | Loading commit data... | |
| reference.rst | Loading commit data... | |
| release.rst | Loading commit data... | |
| requirements.txt | Loading commit data... |