copapy.ones#

copapy.ones(shape)#

Create a tensor of ones with given shape.

Parameters:

shape (Sequence[int] | int) – shape of the tensor to create.

Return type:

tensor[int]

Returns:

New tensor of given shape, initialized with ones.