commit | a0e37f250edf86b68ff0e26380883e9a3bf88434 | [log] [tgz] |
---|---|---|
author | Ivan Smirnov <i.s.smirnov@gmail.com> | Sun Jun 26 16:34:39 2016 +0100 |
committer | Ivan Smirnov <i.s.smirnov@gmail.com> | Sat Aug 13 12:43:16 2016 +0100 |
tree | 3b72adf834eab9dd99e96a98972978b091d485f7 | |
parent | 5a47a16e47cdbb690b2c1e9337e15d3db6f90fb5 [diff] |
npy_format_descriptor::format() - fail if unbound
diff --git a/include/pybind11/numpy.h b/include/pybind11/numpy.h index f940852..73cdce0 100644 --- a/include/pybind11/numpy.h +++ b/include/pybind11/numpy.h
@@ -234,6 +234,8 @@ } static const char* format() { + if (!dtype_()) + pybind11_fail("NumPy: unsupported buffer format!"); return format_(); }