Skip to content

Commit bf127a6

Browse files
committed
Need to iterate over the flattened array.
1 parent d0ba242 commit bf127a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_pytest/python_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def __eq__(self, actual):
211211
the pre-specified tolerance.
212212
"""
213213
if _is_numpy_array(actual):
214-
return all(a == self for a in actual)
214+
return all(a == self for a in actual.flat)
215215

216216
# Short-circuit exact equality.
217217
if actual == self.expected:

0 commit comments

Comments
 (0)