Remove unnecessary numpy import in ApproxSequenceLike
This commit is contained in:
parent
4b6b91fda3
commit
7dd5c4049e
|
@ -319,7 +319,6 @@ class ApproxSequenceLike(ApproxBase):
|
|||
|
||||
def _repr_compare(self, other_side: Sequence[float]) -> List[str]:
|
||||
import math
|
||||
import numpy as np
|
||||
|
||||
if len(self.expected) != len(other_side):
|
||||
return [
|
||||
|
@ -340,7 +339,7 @@ class ApproxSequenceLike(ApproxBase):
|
|||
abs_diff = abs(approx_value.expected - other_value)
|
||||
max_abs_diff = max(max_abs_diff, abs_diff)
|
||||
if other_value == 0.0:
|
||||
max_rel_diff = np.inf
|
||||
max_rel_diff = math.inf
|
||||
else:
|
||||
max_rel_diff = max(max_rel_diff, abs_diff / abs(other_value))
|
||||
different_ids.append(i)
|
||||
|
|
Loading…
Reference in New Issue