pybind11/docs/advanced
Jason Rhinelander b68959e822 Use numpy rather than Eigen for copying
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.
2017-05-08 01:50:21 +02:00
..
cast Add type caster for std::variant and other variant-like classes 2017-04-29 17:31:30 +02:00
pycpp Use numpy rather than Eigen for copying 2017-05-08 01:50:21 +02:00
classes.rst added note about trailing commas (fixes #593) 2017-03-22 21:39:19 +01:00
exceptions.rst Reorganize documentation 2016-10-20 15:21:34 +02:00
functions.rst Add a scope guard call policy 2017-04-03 00:52:47 +02:00
misc.rst Add a scope guard call policy 2017-04-03 00:52:47 +02:00
smart_ptrs.rst Improve custom holder support (#607) 2017-01-31 17:05:44 +01:00