einx.all#
- einx.all(description, tensor, *, keepdims=None, backend=None, **parameters)[source]#
Compute the logical conjunction (AND) of values in the given tensor.
The elementary operation has the signature
[...] -> []and computes the logical conjunction (AND) of all values of the input tensor.If there is no output expression, it is determined implicitly by removing all bracketed expressions from the input expression. For example, the following operations compute the same output:
y = einx.all("a [b]", x) y = einx.all("a [b] -> a", x)
If there are no brackets in the expression, brackets are implicitly placed around all axes that do not appear in the output expression. For example, the following operations compute the same output:
y = einx.all("a b -> a", x) y = einx.all("a [b] -> a", x)
- Parameters:
description (
str) – Description string for the operation in einx notation.tensor (
Tensor) – Input tensor or tensor factory 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.