ufv_leaf_structure#

t3toolbox.backend.ufv_operations.ufv_leaf_structure(d, n_supercores)#
def ufv_leaf_structure(
        d:            int,  # number of modes (length of the int-tuple `shape`)
        n_supercores: int,  # 4 for a UT3Frame .data leaf, 2 for a UT3Variations one
):  # -> leaf-structure template for stacking.apply_func_to_leaf_subtrees

Template marking one bv .data leaf (*supercores, shape, masks) for the tree machinery.

The int-tuple shape has d int leaves, so the template must spell its length out: a bare None there fails to match (an int tuple is a Sequence, unlike the ndarray leaves, so the walker would recurse into it). Mirrors ut3_operations.ut3_leaf_structure.

Parameters:
  • d (int)

  • n_supercores (int)