Skip to main content

random_tensor

Overloads

NameDescription
random_tensor(const List<integer> shape) -> ComplexTensorGenerate a random array of Complex values with the specified shape.
random_tensor(const List<integer> shape, as_complex as_complex) -> ComplexTensorGenerate a random array of Complex values with the specified shape.
random_tensor(const List<integer> shape, as_real as_real) -> RealTensorGenerate a random array of Real values with the specified shape.

random_tensor(const List<integer> shape) -> ComplexTensor

Generate a random array of Complex values with the specified shape.

Parameters

  • shape: List of positive integers specifying the extent of each dimension of the array.

random_tensor(const List<integer> shape, as_complex as_complex) -> ComplexTensor

Generate a random array of Complex values with the specified shape.

Parameters

  • shape: List of positive integers specifying the extent of each dimension of the array.
  • as_complex: desired scalar type

random_tensor(const List<integer> shape, as_real as_real) -> RealTensor

Generate a random array of Real values with the specified shape.

Parameters

  • shape: List of positive integers specifying the extent of each dimension of the array.
  • as_real: desired scalar type