From 75016bde471adf1db59e69a604cf8c2e8ae50864 Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Sun, 28 Jul 2019 14:38:21 -0700 Subject: [PATCH] BUG: Remove stray print that causes a SystemError on python 3.7 due to an exception being in flight We shouldn't be reporting errors via print anyway Related to gh-14142 --- numpy/core/src/multiarray/descriptor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/numpy/core/src/multiarray/descriptor.c b/numpy/core/src/multiarray/descriptor.c index ff85c3fcba31..4d22c9ee73dd 100644 --- a/numpy/core/src/multiarray/descriptor.c +++ b/numpy/core/src/multiarray/descriptor.c @@ -497,9 +497,6 @@ _convert_from_array_descr(PyObject *obj, int align) else { ret = PyArray_DescrConverter(PyTuple_GET_ITEM(item, 1), &conv); } - if (ret == NPY_FAIL) { - PyObject_Print(PyTuple_GET_ITEM(item, 1), stderr, 0); - } } else if (PyTuple_GET_SIZE(item) == 3) { newobj = PyTuple_GetSlice(item, 1, 3); @@ -517,6 +514,7 @@ _convert_from_array_descr(PyObject *obj, int align) if (ret == NPY_FAIL) { goto fail; } + if ((PyDict_GetItem(fields, name) != NULL) || (title && PyBaseString_Check(title)