random_cp#
- ivy.random_cp(shape, rank, /, *, dtype=None, full=False, orthogonal=False, seed=None, normalise_factors=True)[source]#
Generate a random CP tensor.
- Parameters:
shape (
Sequence
[int
]) – shape of the tensor to generaterank (
int
) – rank of the CP decompositionfull (
Optional
[bool
], default:False
) – if True, a full tensor is returned otherwise, the decomposed tensor is returnedorthogonal (
Optional
[bool
], default:False
) – if True, creates a tensor with orthogonal componentsseed (
Optional
[int
], default:None
) – seed for generating random numbers
- Return type:
- Returns:
ivy.CPTensor