diff options
author | Eric Mariasis <ericmariasis829@gmail.com> | 2020-02-01 13:35:46 -0500 |
---|---|---|
committer | Eric Mariasis <ericmariasis829@gmail.com> | 2020-02-01 13:35:46 -0500 |
commit | 1542f59575a9400691cb1a63de3bcdb5265d3e4b (patch) | |
tree | 43dd06e14a0a72e03d5256f8c36bb707436ac4f9 /numpy/core | |
parent | a0336e29347b4eccc92a249b756f89419baf75ca (diff) | |
parent | 303ce30f051070bc73307296faf02bdf7eb00fc5 (diff) | |
download | numpy-1542f59575a9400691cb1a63de3bcdb5265d3e4b.tar.gz |
review actions
Diffstat (limited to 'numpy/core')
-rw-r--r-- | numpy/core/src/multiarray/descriptor.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/numpy/core/src/multiarray/descriptor.c b/numpy/core/src/multiarray/descriptor.c index 0d63566ab..e7ed37111 100644 --- a/numpy/core/src/multiarray/descriptor.c +++ b/numpy/core/src/multiarray/descriptor.c @@ -242,9 +242,13 @@ static PyArray_Descr * _convert_from_tuple(PyObject *obj, int align) { if (PyTuple_GET_SIZE(obj) != 2) { +<<<<<<< HEAD PyErr_Format(PyExc_TypeError, "Tuple must have size 2, but has size %d", PyTuple_GET_SIZE(obj)); +======= + PyErr_Format(PyExc_TypeError, "Tuple must have size 2, but has size %zd", PyTuple_GET_SIZE(obj)); +>>>>>>> 303ce30f051070bc73307296faf02bdf7eb00fc5 return NULL; } PyArray_Descr *type = _convert_from_any(PyTuple_GET_ITEM(obj, 0), align); @@ -506,7 +510,8 @@ _convert_from_array_descr(PyObject *obj, int align) } } else { - PyErr_Format(PyExc_TypeError, "Field elements must be tuples at most 3 elements, got %R", item); + PyErr_Format(PyExc_TypeError, + "Field elements must be tuples with at most 3 elements, got '%R'", item); goto fail; } if ((PyDict_GetItemWithError(fields, name) != NULL) @@ -1499,7 +1504,7 @@ _convert_from_any(PyObject *obj, int align) return ret; } Py_DECREF(ret); - PyErr_Format(PyExc_TypeError, "Cannot interpret %R as a data type"); + PyErr_Format(PyExc_TypeError, "Cannot interpret '%R' as a data type", obj); return NULL; } } |