[TF-numpy] Fixed einsum's signature to be Python2 compatible.
PiperOrigin-RevId: 317490711 Change-Id: Ia33d3958bb3163131d40262cd7247411be4ade52
This commit is contained in:
parent
ae423bd3bf
commit
793c5ca70b
@ -1340,7 +1340,9 @@ def meshgrid(*xi, **kwargs):
|
|||||||
|
|
||||||
|
|
||||||
@np_utils.np_doc('einsum')
|
@np_utils.np_doc('einsum')
|
||||||
def einsum(subscripts, *operands, casting='safe', optimize=False): # pylint: disable=missing-docstring
|
def einsum(subscripts, *operands, **kwargs): # pylint: disable=missing-docstring
|
||||||
|
casting = kwargs.get('casting', 'safe')
|
||||||
|
optimize = kwargs.get('optimize', False)
|
||||||
if casting == 'safe':
|
if casting == 'safe':
|
||||||
operands = np_array_ops._promote_dtype(*operands) # pylint: disable=protected-access
|
operands = np_array_ops._promote_dtype(*operands) # pylint: disable=protected-access
|
||||||
elif casting == 'no':
|
elif casting == 'no':
|
||||||
|
Loading…
Reference in New Issue
Block a user