From bac5c2c0562244b334a3536e8b1b282a179c0094 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 8339cb675ebf..e7a4b6c72a9a 100644 --- a/numpy/core/src/multiarray/descriptor.c +++ b/numpy/core/src/multiarray/descriptor.c @@ -470,9 +470,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); @@ -490,6 +487,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)