From 90d99b56a00a00cf23568435ae5f44ea0c8c3bf1 Mon Sep 17 00:00:00 2001 From: Sergei Izmailov Date: Wed, 20 May 2020 12:42:07 +0300 Subject: [PATCH] Render pybind11::array as numpy.ndarray in docstrings --- include/pybind11/numpy.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/pybind11/numpy.h b/include/pybind11/numpy.h index f26d7aa6..49a1e4f5 100644 --- a/include/pybind11/numpy.h +++ b/include/pybind11/numpy.h @@ -40,6 +40,9 @@ NAMESPACE_BEGIN(PYBIND11_NAMESPACE) class array; // Forward declaration NAMESPACE_BEGIN(detail) + +template <> struct handle_type_name { static constexpr auto name = _("numpy.ndarray"); }; + template struct npy_format_descriptor; struct PyArrayDescr_Proxy {