npy_format_descriptor::format() - fail if unbound

This commit is contained in:
Ivan Smirnov 2016-06-26 16:34:39 +01:00
parent 5a47a16e47
commit a0e37f250e

View File

@ -234,6 +234,8 @@ template <typename T> struct npy_format_descriptor
}
static const char* format() {
if (!dtype_())
pybind11_fail("NumPy: unsupported buffer format!");
return format_();
}