pdft.bases.with_tensors

Contents

pdft.bases.with_tensors#

pdft.bases.with_tensors(basis, tensors)[source]#

A copy of basis holding tensors in place of its own; everything else is kept.

Works on any basis registered as a pytree whose leaves begin with its tensors, which is the convention the trainers rely on.

Parameters:

tensors (Sequence[Array])