einx.logical_and#
- einx.logical_and(description, *tensors, backend=None, **parameters)[source]#
Compute the logical conjunction (AND) of values of multiple given tensors.
The elementary operation takes any number of scalars as input and returns their logical conjunction (AND).
If there is no output expression, one of the input expressions is implicitly used as output expression if it contains the axis names of all other inputs and if this choice is unique. For example, the following pairs of operations compute the same output:
z = einx.logical_and("a b, a", x, y) z = einx.logical_and("a b, a -> a b", x, y) z = einx.logical_and("a b, a b", x, y) z = einx.logical_and("a b, a b -> a b", x, y) z = einx.logical_and("a b, b a", x, y) # raises an exception due to ambiguous output expression
- 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:
Tensor- Returns:
The result of the operation if
graph=False, otherwise the compiled code representation of the operation.