ones

tenpy.linalg.np_conserved.ones(legcharges, dtype=<class 'numpy.float64'>, qtotal=None, labels=None)[source]

Short-hand for Array.from_func() with function numpy.ones().

Warning

For non-trivial charges, only blocks with compatible charges are filled with ones!