pytaco.get_index_vars

pytaco.get_index_vars(vars)

Creates a list of the number of index variables specified.

Parameters
vars: int

The number of index variables to create.

Returns
index_variables: list

A list containing vars pytaco.index_var s.

See also

index_var

Examples

We can create an arbitrary number of index variables easily as follows:

>>> import pytaco as pt
>>> list_of_vars = pt.get_index_vars(10)
>>> len(list_of_vars)
10

We can also immediately unpack the vars as follows:

>>> i, j, k = pt.get_index_vars(3)