From ad5ca6d4e64c8d8521567fe9ac982fafc793d021 Mon Sep 17 00:00:00 2001 From: Ivan Smirnov Date: Mon, 25 Jul 2016 00:58:17 +0100 Subject: [PATCH] Added dtype from const char pointer ctor --- include/pybind11/numpy.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/pybind11/numpy.h b/include/pybind11/numpy.h index b9ee69e6c..59530d4c2 100644 --- a/include/pybind11/numpy.h +++ b/include/pybind11/numpy.h @@ -125,6 +125,8 @@ public: m_ptr = from_args(pybind11::str(format)).release().ptr(); } + dtype(const char *format) : dtype(std::string(format)) { } + dtype(list names, list formats, list offsets, size_t itemsize) { dict args; args["names"] = names;