We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c64939 commit ac47866Copy full SHA for ac47866
1 file changed
devito/operator/operator.py
@@ -1346,7 +1346,6 @@ def _op_symbols(self):
1346
1347
def _apply_override(self, i):
1348
try:
1349
- # TODO: is _obj even needed?
1350
return self.get(i.name, i)._obj
1351
except AttributeError:
1352
return self.get(i.name, i)
@@ -1357,11 +1356,12 @@ def _get_nbytes(self, i):
1357
1356
overrides.
1358
"""
1359
obj = self._apply_override(i)
1360
-
1361
- if obj.is_regular:
1362
- nbytes = obj.nbytes
1363
- else:
+ try:
+ # Non-regular AbstractFunction (compressed, etc)
1364
nbytes = obj.nbytes_max
+ except AttributeError:
+ # Garden-variety AbstractFunction
+ nbytes = obj.nbytes
1365
1366
# Could nominally have symbolic nbytes at this point
1367
if isinstance(nbytes, SympyBasic):
0 commit comments