diff options
Diffstat (limited to 'tensorflow/python/ops/special_math_ops.py')
-rw-r--r-- | tensorflow/python/ops/special_math_ops.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/python/ops/special_math_ops.py b/tensorflow/python/ops/special_math_ops.py index 5e2146b79f..6d7eaababc 100644 --- a/tensorflow/python/ops/special_math_ops.py +++ b/tensorflow/python/ops/special_math_ops.py @@ -163,7 +163,7 @@ def einsum(equation, *inputs, **kwargs): if '...' in equation: raise ValueError('Subscripts with ellipses are not yet supported.') - match = re.match('^([a-zA-Z,]+)(->[a-zA-Z]*)?$', equation) + match = re.match('([a-z,]+)(->[a-z]*)?', equation) if not match: raise ValueError('Indices have incorrect format: %s' % equation) @@ -402,7 +402,7 @@ def _exponential_space_einsum(equation, *inputs): if '...' in equation: raise ValueError('Subscripts with ellipses are not yet supported.') - match = re.match('^([a-zA-Z,]+)(->[a-zA-Z]*)?$', equation) + match = re.match('([a-z,]+)(->[a-z]*)?', equation) if not match: raise ValueError('Indices have incorrect format: %s' % equation) |