Skip to content

Commit

Permalink
Add elemwise param to get_constant_idx
Browse files Browse the repository at this point in the history
  • Loading branch information
nouiz committed Sep 9, 2016
1 parent e77d567 commit e7fe132
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions theano/tensor/subtensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def convert(entry, slice_ok=True):
raise AdvancedIndexingError(Subtensor.e_indextype, entry)

def get_constant_idx(self, inputs, allow_partial=False,
only_process_constants=False):
only_process_constants=False, elemwise=True):
"""
Return the idx_list with constant inputs replaced by their
python scalar equivalent.
Expand Down Expand Up @@ -442,7 +442,8 @@ def conv(val):
try:
return get_scalar_constant_value(
val,
only_process_constants=only_process_constants)
only_process_constants=only_process_constants,
elemwise=elemwise)
except theano.tensor.NotScalarConstantError:
if allow_partial:
return val
Expand Down

0 comments on commit e7fe132

Please sign in to comment.