Traceback (most recent call last): File "/pytest.py", line 586, in _run_test_function func(**args) File "/test_demo.py", line 139, in test_approx_numpy_array assert a == pytest.approx(b, rel=1e-6) ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()