Skip to content

Commit 42bb0b3

Browse files
committed
1 parent 1bb463a commit 42bb0b3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/_pytest/python_api.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ def _yield_comparisons(self, actual):
150150

151151
if np.isscalar(actual):
152152
for i in np.ndindex(self.expected.shape):
153-
yield actual, np.asscalar(self.expected[i])
153+
yield actual, self.expected[i].item()
154154
else:
155155
for i in np.ndindex(self.expected.shape):
156-
yield np.asscalar(actual[i]), np.asscalar(self.expected[i])
156+
yield actual[i].item(), self.expected[i].item()
157157

158158

159159
class ApproxMapping(ApproxBase):

0 commit comments

Comments
 (0)