mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-30 00:47:12 +00:00
Update npy_format_descriptor::name()
This commit is contained in:
parent
076b953ccd
commit
41c3399021
@ -70,3 +70,5 @@ check_eq(arr, [((False, 0, 0.0), (True, 1, 1.5)),
|
|||||||
((True, 1, 1.5), (False, 2, 3.0)),
|
((True, 1, 1.5), (False, 2, 3.0)),
|
||||||
((False, 2, 3.0), (True, 3, 4.5))], nested_dtype)
|
((False, 2, 3.0), (True, 3, 4.5))], nested_dtype)
|
||||||
print_rec_nested(arr)
|
print_rec_nested(arr)
|
||||||
|
|
||||||
|
assert create_rec_nested.__doc__.strip().endswith('numpy.ndarray[dtype=NestedStruct]')
|
||||||
|
@ -281,7 +281,7 @@ struct field_descriptor {
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct npy_format_descriptor<T, typename std::enable_if<is_pod_struct<T>::value>::type> {
|
struct npy_format_descriptor<T, typename std::enable_if<is_pod_struct<T>::value>::type> {
|
||||||
static PYBIND11_DESCR name() { return _("user-defined"); }
|
static PYBIND11_DESCR name() { return _("struct"); }
|
||||||
|
|
||||||
static object dtype() {
|
static object dtype() {
|
||||||
if (!dtype_())
|
if (!dtype_())
|
||||||
|
Loading…
Reference in New Issue
Block a user