MultiDimVar

Contents

MultiDimVar#

class penzai.core.shapecheck.MultiDimVar[source]#

Bases: object

A variable standing in for a sequence or dictionary axis names.

The usual way to create a MultiDimVar is by unpacking the var function, e.g. as (1, 2, *var("foo"), 5, 6) or {'a': 1, **var("foo"), 'c': 5}. You can also cast the output of var to a tuple or a dict.

Variables:

name (str) – The unique name for this variable. Variable identity is based on this name.

Methods

__init__(name)

Attributes

name