summaryrefslogtreecommitdiff
path: root/numpy/core/src
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2018-01-11 22:07:56 -0800
committerEric Wieser <wieser.eric@gmail.com>2018-02-15 00:53:19 -0800
commita30b29466087997255737bd2ae04ede0c4f71448 (patch)
tree44434ab1eec4fdb1354b413d207810cfcbac79f3 /numpy/core/src
parent087619a78dedb3f491654d727d279c1dcb4fb480 (diff)
downloadnumpy-a30b29466087997255737bd2ae04ede0c4f71448.tar.gz
BUG: Show the base of a compound dtype even when it doesn't subclass void
Diffstat (limited to 'numpy/core/src')
-rw-r--r--numpy/core/src/multiarray/descriptor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/src/multiarray/descriptor.c b/numpy/core/src/multiarray/descriptor.c
index f6b29edfe..91cf2ad9d 100644
--- a/numpy/core/src/multiarray/descriptor.c
+++ b/numpy/core/src/multiarray/descriptor.c
@@ -3356,8 +3356,8 @@ arraydescr_struct_str(PyArray_Descr *dtype, int includealignflag)
sub = arraydescr_struct_dict_str(dtype, includealignflag);
}
- /* If the data type has a non-void (subclassed) type, show it */
- if (dtype->type_num == NPY_VOID && dtype->typeobj != &PyVoidArrType_Type) {
+ /* If the data type isn't the default, void, show it */
+ if (dtype->typeobj != &PyVoidArrType_Type) {
/*
* Note: We cannot get the type name from dtype->typeobj->tp_name
* because its value depends on whether the type is dynamically or