Skip to content

Commit a48c553

Browse files
committed
compiler: Fixup BasicWrapperMixin.is_commutative
1 parent e6806ec commit a48c553

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

devito/symbolics/extended_sympy.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,10 @@ def is_commutative(self):
148148
"""
149149
Overridden SymPy assumption -- now based on the wrapped object dtype.
150150
"""
151-
return issubclass(self.dtype, np.number)
151+
try:
152+
return issubclass(self.dtype, np.number)
153+
except TypeError:
154+
return self.dtype in ctypes_vector_mapper
152155

153156
def _sympystr(self, printer):
154157
return str(self)

0 commit comments

Comments
 (0)