mirror of
https://github.com/RYDE-WORK/pybind11.git
synced 2026-02-04 06:23:30 +08: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() {
|
static const char* format() {
|
||||||
|
if (!dtype_())
|
||||||
|
pybind11_fail("NumPy: unsupported buffer format!");
|
||||||
return format_();
|
return format_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user