diff --git a/numpy/f2py/tests/test_callback.py b/numpy/f2py/tests/test_callback.py index 335b78413db9..018cea4fd5e3 100644 --- a/numpy/f2py/tests/test_callback.py +++ b/numpy/f2py/tests/test_callback.py @@ -116,7 +116,7 @@ def callback(cu, lencu): f = getattr(self.module, "string_callback_array") for cu in [cu1, cu2, cu3]: - res = f(callback, cu, len(cu)) + res = f(callback, cu, cu.size) assert res == 0 def test_threadsafety(self):