TensorFormat#
-
class nvmath.
sparse. ust. TensorFormat(dimensions, levels, *, name=None)[source]# A universal sparse tensor format maps dimension specifications (dimensions for short) to level specifications (levels for short).
- Parameters:
dimensions – a sequence of Dimension objects.
levels – an ordered dictionary from a LevelExpr or Dimension object to a LevelFormat, or a (LevelFormat, LevelProperty) pair.
name – a name for the format as a string. If the format corresponds to an existing format like CSR, COO, etc. use the canonical name. A name will be generated based on the level specification if none is provided.
Attributes
- dimensions#
Get the dimension specifications for this format.
- is_identity#
Determine whether the format uses identity mapping between dimensions and levels.
- is_ordered#
Determine whether the format is ordered.
- is_unique#
Determine whether the format is unique.
- levels#
Get the level specifications for this format.
- name#
Get the name of the sparse tensor format.
- num_dimensions#
Get the number of dimensions (rank of tensor).
- num_levels#
Get the number of levels (rank of storage).
Methods