mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-11 08:03:55 +00:00
npy_format_descriptor::format() - fail if unbound
This commit is contained in:
parent
5a47a16e47
commit
a0e37f250e
@ -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_();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user