Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d54b678 + 1b83d85 commit 34d7beeCopy full SHA for 34d7bee
1 file changed
numpy/f2py/src/fortranobject.c
@@ -741,14 +741,12 @@ PyArrayObject* array_from_pyobj(const int type_num,
741
return arr;
742
}
743
744
- if ((intent & F2PY_INTENT_INOUT)
745
- || (intent & F2PY_INTENT_INPLACE)
746
- || (intent & F2PY_INTENT_CACHE)) {
747
- sprintf(mess,"failed to initialize intent(inout|inplace|cache) array"
748
- " -- input must be array but got %s",
749
- PyString_AsString(PyObject_Str(PyObject_Type(obj)))
750
- );
751
- PyErr_SetString(PyExc_TypeError,mess);
+ if ((intent & F2PY_INTENT_INOUT) ||
+ (intent & F2PY_INTENT_INPLACE) ||
+ (intent & F2PY_INTENT_CACHE)) {
+ PyErr_SetString(PyExc_TypeError,
+ "failed to initialize intent(inout|inplace|cache) "
+ "array, input not an array");
752
return NULL;
753
754
0 commit comments