Skip to content

Commit 94f483f

Browse files
committed
misc: Tidy up leftovers
1 parent 71069d2 commit 94f483f

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

devito/ir/clusters/cluster.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -304,13 +304,12 @@ def dtype(self):
304304
"""
305305
dtypes = set()
306306
for i in self.exprs:
307-
# try:
308-
if np.issubdtype(i.dtype, np.generic):
309-
dtypes.add(i.dtype)
310-
# except TypeError:
311-
# print(i, type(i), i.dtype, np.issubdtype(i.dtype, np.generic))
312-
# # E.g. `i.dtype` is a ctypes pointer, which has no dtype equivalent
313-
# pass
307+
try:
308+
if np.issubdtype(i.dtype, np.generic):
309+
dtypes.add(i.dtype)
310+
except TypeError:
311+
# E.g. `i.dtype` is a ctypes pointer, which has no dtype equivalent
312+
pass
314313

315314
return infer_dtype(dtypes)
316315

devito/ir/equations/equation.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ def directions(self):
4848

4949
@property
5050
def dtype(self):
51-
try:
52-
return infer_dtype({self.lhs.dtype, self.rhs.dtype} - {None})
53-
except AttributeError:
54-
return self.lhs.dtype
51+
return self.lhs.dtype
5552

5653
@property
5754
def state(self):

0 commit comments

Comments
 (0)