Closed rpanderson closed 4 years ago
It's not just an abbreviation, isinstance(np.array(0), np.ndarray)
returns True
so would have failed the unabbreviated equality check even though np.array(0)
is a valid scalar that ought to be considered equal to zero. So this is better.
68 introduced a bug as the
==
comparison witharray[0]
raisedValueError
.