Raise TypeError for types that can't be compared to arrays.
This commit is contained in:
parent
4c45bc9971
commit
ebc7346be4
|
@ -66,7 +66,7 @@ class ApproxNumpy(ApproxBase):
|
|||
try:
|
||||
actual = np.asarray(actual)
|
||||
except:
|
||||
raise ValueError("cannot compare '{0}' to numpy.ndarray".format(actual))
|
||||
raise TypeError("cannot compare '{0}' to numpy.ndarray".format(actual))
|
||||
|
||||
if actual.shape != self.expected.shape:
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue