- 17 Nov, 2016 1 commit
-
-
Dean Moldovan authored
* `array_t(const object &)` now throws on error * `array_t::ensure()` is intended for casters —- old constructor is deprecated * `array` and `array_t` get default constructors (empty array) * `array` gets a converting constructor * `py::isinstance<array_T<T>>()` checks the type (but not flags) There is only one special thing which must remain: `array_t` gets its own `type_caster` specialization which uses `ensure` instead of a simple check.
-
- 16 Nov, 2016 1 commit
-
-
Sylvain Corlay authored
* Also added unsafe version without checks
-
- 27 Oct, 2016 2 commits
-
-
Wenzel Jakob authored
-
Wenzel Jakob authored
The current integer caster was unnecessarily strict and rejected various kinds of NumPy integer types when calling C++ functions expecting normal integers. This relaxes the current behavior.
-
- 13 Oct, 2016 1 commit
-
-
Wenzel Jakob authored
-
- 12 Oct, 2016 2 commits
-
-
Wenzel Jakob authored
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.
-
Wenzel Jakob authored
- This actually works with no changes, I just wasn't 100% convinced and decided to write a test to see if it's true.
-
- 10 Sep, 2016 2 commits
-
-
Ivan Smirnov authored
-
Ivan Smirnov authored
-