Details
The returned function keeps the call signature and behavior of the corresponding operator in the
Gravifer/Einstoff paclet.
ResourceFunction["Einstoff"] is an operator selector. ResourceFunction["Einstoff"][operator] returns the curried interface for that operation; the returned function accepts a shape description, a list of tensors, an optional list of axis-size bindings, and options.
Built-in symbols accepted as the operator argument include
ArrayReshape,
ArrayReduce,
Operate,
Map,
Dot,
Inner,
Join and
Split. String selectors accepted in the same argument are
"Massage",
"ArrayContract" and
"einsum".
ResourceFunction["Einstoff"]["Massage"] selects the permissive structural engine;
ResourceFunction["Einstoff"][ArrayReshape] and
ResourceFunction["Einstoff"]["ArrayContract"] impose narrower capability checks.
A description is normally a
RuleDelayed expression
{inputShape1, inputShape2, …} ⧴ {outputShape1, outputShape2, …}. Each shape is a list of dimension terms, and tensors is a list whose arity agrees with the input shapes.
On the complete left-hand side, a_ binds and infers the logical axis a. Repeated occurrences of a_ denote the same logical axis and must have equal size. A bare a on the left remains an ambient expression; a bare a on the right references the completed left-hand-side binding.
CircleTimes composes logical axes into one physical dimension.
CirclePlus denotes a structural direct sum used by
ResourceFunction["Einstoff"][Join],
ResourceFunction["Einstoff"][Split], and the permissive
ResourceFunction["Einstoff"]["Massage"]. Positive integers denote literal sizes, and 1 or an empty shape represents a unit axis where applicable.
Targeted axes identify blocks consumed by reduction, contraction or mapped operations. String axes may be targeted with
Slot,
Highlighted or
Framed; symbol axes use
Highlighted or
Framed. Targeting is occurrence metadata and does not change logical axis identity.
Annotation[axis,n] and
Labeled[n,axis] declare an inline positive-integer size on either side of a description. They compose in either nesting order with valid targeting wrappers. A sized blank both infers its size and checks equality with
n.
Explicit bindings are supplied as a list of rules, for example {"channels"→3}. Symbol and string spellings for one logical name may not be mixed, and inference-only blank spellings are not valid out-of-band binding keys.
For the operator selectors
ArrayReshape,
"Massage",
"ArrayContract",
ArrayReduce,
Dot,
Inner and
"einsum", the option
"Targeting" accepts
True,
False or
Automatic to control whether operated axes are inferred, checked against explicit targets, or required explicitly.
TraceAction→Hold or
TraceAction→Defer returns the lowered Wolfram expression instead of executing it normally.
ResourceFunction["Einstoff"][ArrayReduce] accepts either a Wolfram reducer or a case-insensitive recipe name:
sum,
total,
add,
mean,
average,
max,
min,
prod,
product,
times,
var,
variance,
std,
stddev,
count_nonzero,
countnonzero,
any,
all,
logsumexp or
lse. Variance and standard deviation use population normalization, and any/all test whether elements are nonzero.
ResourceFunction["Einstoff"][Operate] accepts a Wolfram function or a case-insensitive shape-preserving recipe name:
id,
identity,
flip,
reverse,
sort,
softmax,
log_softmax or
logsoftmax. Parameterized operations can be supplied directly as functions, for example
RotateLeft[#,k]&.
This resource delegates through
PacletSymbol to the published Gravifer/Einstoff paclet, which requires Wolfram Language 15.0 or later. Parsing, validation, planning and execution remain versioned in that paclet rather than being copied into this Resource Function.
For now, the
Gravifer/Einstoff paclet requires Wolfram Language 15.0 or later;
PacletSymbol cannot resolve this resource on an older system.
Use
RuleDelayed for descriptions.
Rule may evaluate its right-hand side before
ResourceFunction["Einstoff"] captures the description and is supported only on a best-effort basis.
Bare symbols on the left-hand side are ambient expressions, not references to another blank of the same spelling. Use a_ to bind an inferred axis and use bare a on the right-hand side to reference that completed binding.
String axes are hygienic and immune to ambient symbol values. Keep explicit bindings in a list, for example {"channels"→3}.
ResourceFunction["Einstoff"] is inspired by
einops and
einx, but uses Wolfram Language rules instead of parsing raw strings.