Learn R Programming

einops (version 0.2.1)

get_identifiers: Given a OneSidedAstNode object, get unique identifiers

Description

get an unordered list, representing a set of all unique identifiers on one side of the expression. Named nodes become the character representing its name, ConstantAstNode nodes are just themselves, aside from 1 which is ignored. GroupAstNode nodes are flattened, and EllipsisAstNode nodes are ignored.

Usage

get_identifiers(ast, ...)

Value

an AxisNames() of unique identifiers

Arguments

ast

the Abstract Syntax Tree (AST) of the einops expression positions to the ConstantAstNode objects in the output. This will REMOVE all other elements in the src list.

...

additional arguments (not used)