Wenzel Jakob
369e9b3937
Permit creation of NumPy arrays with a "base" object that owns the data
...
This patch adds an extra base handle parameter to most ``py::array`` and
``py::array_t<>`` constructors. If specified along with a pointer to
data, the base object will be registered within NumPy, which increases
the base's reference count. This feature is useful to create shallow
copies of C++ or Python arrays while ensuring that the owners of the
underlying can't be garbage collected while referenced by NumPy.
The commit also adds a simple test function involving a ``wrap()``
function that creates shallow copies of various N-D arrays.
2016-10-13 01:03:40 +02:00
..
2016-10-09 20:14:23 +02:00
2016-09-07 01:25:27 +02:00
2016-09-23 02:00:01 +02:00
2016-09-06 13:02:29 +09:00
2016-09-23 01:40:22 +02:00
2016-09-07 01:25:27 +02:00
2016-09-09 03:04:09 -04:00
2016-09-09 03:04:09 -04:00
2016-09-03 17:34:41 -04:00
2016-08-19 13:19:38 +02:00
2016-09-06 16:41:50 +02:00
2016-09-19 13:43:43 +02:00
2016-09-13 20:40:28 +10:00
2016-09-28 00:59:21 +10:00
2016-09-06 12:22:13 -04:00
2016-09-06 12:22:13 -04:00
2016-09-03 17:34:41 -04:00
2016-08-19 13:19:38 +02:00
2016-09-06 13:02:29 +09:00
2016-08-25 17:08:09 +02:00
2016-09-06 13:02:29 +09:00
2016-08-19 13:19:38 +02:00
2016-08-19 16:31:48 +02:00
2016-09-10 12:08:32 +02:00
2016-08-19 16:31:48 +02:00
2016-09-16 08:04:15 +02:00
2016-09-16 08:04:15 +02:00
2016-09-19 13:45:31 +02:00
2016-09-19 13:43:43 +02:00
2016-09-10 17:16:16 +09:00
2016-09-19 13:43:43 +02:00
2016-09-07 01:25:27 +02:00
2016-08-19 13:19:38 +02:00
2016-09-06 16:41:50 +02:00
2016-09-19 13:43:43 +02:00
2016-09-03 17:34:41 -04:00
2016-08-19 13:19:38 +02:00
2016-09-03 17:34:41 -04:00
2016-08-19 13:19:38 +02:00
2016-09-19 13:45:31 +02:00
2016-09-19 13:45:31 +02:00
2016-10-13 01:03:40 +02:00
2016-10-13 01:03:40 +02:00
2016-09-03 17:34:41 -04:00
2016-08-25 17:08:09 +02:00
2016-09-07 01:25:27 +02:00
2016-08-19 13:19:38 +02:00
2016-09-03 17:34:41 -04:00
2016-09-19 13:43:43 +02:00
2016-09-03 17:34:41 -04:00
2016-08-19 13:19:38 +02:00
2016-09-03 17:34:41 -04:00
2016-08-19 13:19:38 +02:00
2016-09-23 02:00:01 +02:00
2016-09-23 02:00:01 +02:00
2016-09-03 17:34:41 -04:00
2016-08-24 23:30:00 +01:00
2016-09-07 01:25:27 +02:00
2016-09-04 18:23:55 -04:00
2016-09-06 13:02:29 +09:00
2016-09-05 17:11:16 -04:00
2016-09-11 01:21:53 -04:00
2016-09-11 01:21:53 -04:00