Raise TypeError for types that can't be compared to arrays.

This commit is contained in:
Kale Kundert 2017-07-22 09:05:12 -07:00
parent 4c45bc9971
commit ebc7346be4
No known key found for this signature in database
GPG Key ID: C6238221D17CAFAE
1 changed files with 1 additions and 1 deletions

View File

@ -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