einx.id#
- einx.id(description, *tensors, backend=None, **parameters)[source]#
Compute the identity-map of values in the given tensor.
In the simplest case, the elementary operation has the signature
[] -> []and returns the input as-is. If there are more than one input/ output or concatenated inputs/ outputs, the ordered tuple of inputs is returned as-is.- Parameters:
description (
str) – Description string for the operation in einx notation.*tensors (
Tensor) – Input tensors or tensor factories matching the description string.backend (
Union[Backend,str,None]) – Backend to use for all operations. If None, uses the default backend for the given setting. Defaults to None.graph – Whether to return the compiled code representation of this operation instead of computing the result. Defaults to False.
**parameters (
Union[_Buffer,_SupportsArray[dtype[Any]],_NestedSequence[_SupportsArray[dtype[Any]]],bool,int,float,complex,str,bytes,_NestedSequence[bool|int|float|complex|str|bytes]]) – Additional parameters that specify dimension sizes, e.g.a=4.
- Return type:
Any- Returns:
The result of the operation if
graph=False, otherwise the compiled code representation of the operation.