Skip to content

fix: add missing signature #2363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/pybind11/numpy.h
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,8 @@ class array : public buffer {
template <typename T>
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 {
Expand Down Expand Up @@ -858,7 +858,7 @@ template <typename T, int ExtraFlags = array::forcecast> class array_t : 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) { }
Expand Down