normalize_max_ranks =================== .. py:function:: t3toolbox.backend.ranks.normalize_max_ranks(spec, length) .. code-block:: python def normalize_max_ranks( spec, # None | int | Sequence[int or None] length: int, # d for Tucker ranks, d+1 for TT ranks ) -> typ.Tuple: # length-`length` tuple of (int or None); None entry = no cap at that position Normalize a max-rank specification to a per-position tuple. ``None`` -> no cap anywhere; a scalar caps every position uniformly; a sequence is per-position (length-checked). Shared by :py:func:`t3svd` and the elementwise-multiply (``t3m``) backends so a scalar like ``max_tt_ranks=4`` works the same everywhere.