tensorly.ones

ones(shape, dtype=None)

Return a new tensor of given shape and type, filled with ones.

Parameters
shapeint or sequence of ints

Shape of the new tensor.

dtypedata-type, optional

The desired data-type for the tensor.