properties
properties copied to clipboard
properties.basic.GettableProperty.equal fail on numpy arrays on modern numpy
Comparing elements of numpy arrays of different sizes have long given deprecation warnings, and in modern numpy it fails with an exception. To handle this case, change https://github.com/seequent/properties/blob/dev/properties/basic.py#L264 to:
def equal(self, value_a, value_b):
try:
equal = value_a == value_b
except:
return False
if hasattr(equal, '__iter__'):
return all(equal)
return equal