idk
This commit is contained in:
parent
b5ee309a2c
commit
6fa6835aa9
|
@ -0,0 +1 @@
|
|||
Fixed attribute error in pytest.approx for types implicitly convertible to numpy arrays by converting other_side to a numpy array so that np_array_shape != other_side.shape can be properly checked.
|
|
@ -773,12 +773,10 @@ class TestApprox:
|
|||
self.vals = vals
|
||||
|
||||
def __array__(self, dtype=None, copy=None):
|
||||
print("called __array__ in ImplicitArray")
|
||||
return np.array(self.vals)
|
||||
|
||||
vec1 = ImplicitArray([1.0, 2.0, 3.0])
|
||||
vec2 = ImplicitArray([1.0, 2.0, 4.0])
|
||||
# see issue #12114 for test case
|
||||
assert vec1 != approx(vec2)
|
||||
|
||||
def test_numpy_array_protocol(self):
|
||||
|
|
Loading…
Reference in New Issue