mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-26 23:22:01 +00:00
Add missing handle_type_name<dtype>
.
Discovered via manual inspection by @sizmailov: https://github.com/pybind/pybind11/pull/4888#issuecomment-1774023960 NOTE: This is actually a bug fix, in its own right.
This commit is contained in:
parent
74817b7f9f
commit
6a3a954a6b
@ -41,10 +41,16 @@ PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
|
|||||||
|
|
||||||
PYBIND11_WARNING_DISABLE_MSVC(4127)
|
PYBIND11_WARNING_DISABLE_MSVC(4127)
|
||||||
|
|
||||||
|
class dtype; // Forward declaration
|
||||||
class array; // Forward declaration
|
class array; // Forward declaration
|
||||||
|
|
||||||
PYBIND11_NAMESPACE_BEGIN(detail)
|
PYBIND11_NAMESPACE_BEGIN(detail)
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct handle_type_name<dtype> {
|
||||||
|
static constexpr auto name = const_name("numpy.dtype");
|
||||||
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct handle_type_name<array> {
|
struct handle_type_name<array> {
|
||||||
static constexpr auto name = const_name("numpy.ndarray");
|
static constexpr auto name = const_name("numpy.ndarray");
|
||||||
|
Loading…
Reference in New Issue
Block a user