diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2014-02-20 10:08:06 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2014-02-20 10:08:06 -0700 |
commit | 34d7bee3d472e5b97c1ea7c8d7e8d9949a9ebc16 (patch) | |
tree | 48b11c8d2357de61adc134dcf073ea1baa28b4b6 /numpy/f2py | |
parent | d54b6784501de8aef405794f20cf1f4b3941c68f (diff) | |
parent | 1b83d85bc4cfaccb12295d993c5a12e5c4029030 (diff) | |
download | numpy-34d7bee3d472e5b97c1ea7c8d7e8d9949a9ebc16.tar.gz |
Merge pull request #4315 from charris/fix-gh-2408
BUG: #2408, Fix f2py Python 3 error message string bug.
Diffstat (limited to 'numpy/f2py')
-rw-r--r-- | numpy/f2py/src/fortranobject.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/numpy/f2py/src/fortranobject.c b/numpy/f2py/src/fortranobject.c index 0cc32348e..9c96c1f46 100644 --- a/numpy/f2py/src/fortranobject.c +++ b/numpy/f2py/src/fortranobject.c @@ -741,14 +741,12 @@ PyArrayObject* array_from_pyobj(const int type_num, return arr; } - if ((intent & F2PY_INTENT_INOUT) - || (intent & F2PY_INTENT_INPLACE) - || (intent & F2PY_INTENT_CACHE)) { - sprintf(mess,"failed to initialize intent(inout|inplace|cache) array" - " -- input must be array but got %s", - PyString_AsString(PyObject_Str(PyObject_Type(obj))) - ); - 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"); return NULL; } |