Learn R Programming

einops (version 0.2.1)

validate_reduction_operation: Syntactically Validate the reduction operation in the einops expression

Description

Syntactically Validate the reduction operation in the einops expression

Usage

validate_reduction_operation(einops_ast, operation)

Value

the input einops_ast (invisibly) if the validation passes

Arguments

einops_ast

the parsed Abstract Syntax Tree (AST) of the einops expression

operation

the reduction operation, either a string or a function