Skip to content

Commit 76f7e24

Browse files
committed
Update util.py
Proposal for a fix for issue #40
1 parent a661a56 commit 76f7e24

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Diff for: breze/arch/util.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -421,14 +421,13 @@ def _unify_exprs(self, exprs):
421421
if isinstance(exprs, (str, unicode)):
422422
# We are only being given a single string expression.
423423
exprs = self.exprs[exprs]
424-
elif isinstance(exprs, theano.tensor.basic.TensorVariable):
425-
# TODO: does this work in case of the GPU?
426-
exprs = exprs
427-
else:
424+
elif isinstance(exprs, list):
428425
# We have several, either string or variable, thus make it a list
429426
# and substitute the strings.
430427
exprs = list(exprs)
431428
exprs = [self.exprs[i] if isinstance(i, str) else i for i in exprs]
429+
else:
430+
exprs = exprs
432431

433432
return exprs
434433

0 commit comments

Comments
 (0)