Skip to content
Snippets Groups Projects

Declare FieldShapeSymbol and FieldStrideSymbol as strictly positive

1 file
+ 7
0
Compare changes
  • Side-by-side
  • Inline
+ 7
0
@@ -143,6 +143,13 @@ class TypedSymbol(sp.Symbol):
@@ -143,6 +143,13 @@ class TypedSymbol(sp.Symbol):
return super().is_positive
return super().is_positive
 
@property
 
def is_nonnegative(self):
 
if self.is_negative is False:
 
return True
 
else:
 
return super().is_nonnegative
 
@property
@property
def is_real(self):
def is_real(self):
if hasattr(self.dtype, 'numpy_dtype'):
if hasattr(self.dtype, 'numpy_dtype'):
Loading