Commit a0e37f25 by Ivan Smirnov

npy_format_descriptor::format() - fail if unbound

parent 5a47a16e
...@@ -234,6 +234,8 @@ template <typename T> struct npy_format_descriptor ...@@ -234,6 +234,8 @@ template <typename T> struct npy_format_descriptor
} }
static const char* format() { static const char* format() {
if (!dtype_())
pybind11_fail("NumPy: unsupported buffer format!");
return format_(); return format_();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment