expand_ellipsis: Expand ellipses of an EinopsAst

View source: R/compiler-TransformRecipe.R

expand_ellipsisR Documentation

Expand ellipses of an EinopsAst

Description

Helper for prepare_transformation_recipe().

This function expands each relevant ellipsis ast node in-place into a sequence of NamedAxisAstNode nodes, where each node will have a name like "...1", "...2", etc. and an empty src list.

Also does some further validation of the ellipses syntax using ndim.

Usage

expand_ellipsis(einops_ast, ndim)

Arguments

einops_ast

an EinopsAst

ndim

integer. Number of dimensions in the input tensor

Value

an expanded EinopsAst with ellipses expanded


einops documentation built on Sept. 9, 2025, 5:29 p.m.