diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2022-05-05 11:06:17 +0200 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2022-05-09 17:13:13 +0200 |
commit | dcb8b07a9dba77cba14390859b9c8eec37f823d2 (patch) | |
tree | 28d9845b1bc0c60064c5a95dd1bee3698c1cf803 /numpy | |
parent | 8f8e4465bfdb2ca570cc5be3018913d39f27c76c (diff) | |
download | numpy-dcb8b07a9dba77cba14390859b9c8eec37f823d2.tar.gz |
fixup promote types
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/multiarray/convert_datatype.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/convert_datatype.c b/numpy/core/src/multiarray/convert_datatype.c index 557bb913b..c19fe8e23 100644 --- a/numpy/core/src/multiarray/convert_datatype.c +++ b/numpy/core/src/multiarray/convert_datatype.c @@ -1076,7 +1076,7 @@ PyArray_PromoteTypes(PyArray_Descr *type1, PyArray_Descr *type2) /* Fast path for identical inputs (NOTE: This path preserves metadata!) */ if (type1 == type2 /* Use for builtin except void, void has no reliable byteorder */ - && type1->type_num > 0 && type1->type_num < NPY_NTYPES + && type1->type_num >= 0 && type1->type_num < NPY_NTYPES && PyArray_ISNBO(type1->byteorder) && type1->type_num != NPY_VOID) { Py_INCREF(type1); return type1; |