diff --git a/include/pybind11/numpy.h b/include/pybind11/numpy.h index 04001d6c5..588cc1519 100644 --- a/include/pybind11/numpy.h +++ b/include/pybind11/numpy.h @@ -170,7 +170,7 @@ public: m_ptr = descr.strip_padding().release().ptr(); } - explicit dtype(std::string format) { + explicit dtype(const std::string &format) { m_ptr = from_args(pybind11::str(format)).release().ptr(); }