From 2e2de8c87a65aba78db65f60915a90b6f20e9c46 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 13 Aug 2020 20:13:16 -0400 Subject: [PATCH] fix: add missing signature (#2363) * fix: add missing signature * fix: add to array_t too --- include/pybind11/numpy.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/pybind11/numpy.h b/include/pybind11/numpy.h index 5b6cea2b4..674450a63 100644 --- a/include/pybind11/numpy.h +++ b/include/pybind11/numpy.h @@ -611,8 +611,8 @@ public: template explicit array(ssize_t count, const T *ptr, handle base = handle()) : array({count}, {}, ptr, base) { } - explicit array(const buffer_info &info) - : array(pybind11::dtype(info), info.shape, info.strides, info.ptr) { } + explicit array(const buffer_info &info, handle base = handle()) + : array(pybind11::dtype(info), info.shape, info.strides, info.ptr, base) { } /// Array descriptor (dtype) pybind11::dtype dtype() const { @@ -858,7 +858,7 @@ public: if (!m_ptr) throw error_already_set(); } - explicit array_t(const buffer_info& info) : array(info) { } + explicit array_t(const buffer_info& info, handle base = handle()) : array(info, base) { } array_t(ShapeContainer shape, StridesContainer strides, const T *ptr = nullptr, handle base = handle()) : array(std::move(shape), std::move(strides), ptr, base) { }