summaryrefslogtreecommitdiff
path: root/numpy/core/src
diff options
context:
space:
mode:
authorAllan Haldane <ealloc@gmail.com>2018-02-15 16:27:51 +0100
committerGitHub <noreply@github.com>2018-02-15 16:27:51 +0100
commit69fa37f422c845655492220440735e7c800306b8 (patch)
tree48b423d4b58e6e0dffe8af8c8a6d50bdaf2019f3 /numpy/core/src
parent921b42a194190345eafba0286b8f528e57526e81 (diff)
parentfed44d7c309d0c2fd7c193efa39ba59652a43c44 (diff)
downloadnumpy-69fa37f422c845655492220440735e7c800306b8.tar.gz
Merge pull request #10381 from eric-wieser/fix-segfault
BUG/ENH: Improve output for structured non-void types
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 80161b71c..897155238 100644
--- a/numpy/core/src/multiarray/descriptor.c
+++ b/numpy/core/src/multiarray/descriptor.c
@@ -3340,8 +3340,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