Skip to main content

ComplexTensor

ComplexTensor constructor. A multidimensionnal array of Complex, up to 5 dimensions.

Factories

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

generate a delta-array of Complex with the specified shape. The delta array is one if all indices have the same value, zero otherwise.

Parameters

  • shape: list of positive integers specifying the size along each dimensions of the array

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

generate a delta-array of Complex with the specified shape. The delta array is one if all indices have the same value, zero otherwise.

Parameters

  • shape: list of positive integers specifying the size along each dimensions of the array
  • as_complex: desired scalar type

filled_tensor(const List<integer> shape, const complex value) -> ComplexTensor

generate an array of Complex values filled with a constant value and the specified shape

Parameters

  • shape: list of positive integers specifying the size along each dimensions of the array
  • value: the constant value to fill the array with

filled_tensor(const List<integer> shape, integer value) -> ComplexTensor

generate an array of Complex values filled with a constant value and the specified shape

Parameters

  • shape: list of positive integers specifying the size along each dimensions of the array
  • value: the constant value to fill the array with

filled_tensor(const List<integer> shape, real value) -> ComplexTensor

generate an array of Complex values filled with a constant value and the specified shape

Parameters

  • shape: list of positive integers specifying the size along each dimensions of the array
  • value: the constant value to fill the array with

filled_tensor(const List<integer> shape, const complex value, as_complex as_complex) -> ComplexTensor

generate an array of Complex values filled with a constant value and the specified shape

Parameters

  • shape: list of positive integers specifying the size along each dimensions of the array
  • value: the constant value to fill the array with
  • as_complex: desired scalar type

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

generate an array of Complex values filled with a constant value and the specified shape

Parameters

  • shape: list of positive integers specifying the size along each dimensions of the array
  • value: the constant value to fill the array with
  • as_complex: desired scalar type

filled_tensor(const List<integer> shape, real value, as_complex as_complex) -> ComplexTensor

generate an array of Complex values filled with a constant value and the specified shape

Parameters

  • shape: list of positive integers specifying the size along each dimensions of the array
  • value: the constant value to fill the array with
  • as_complex: desired scalar type

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

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

generate an array of uninitialized Complex values with the specified shape

Parameters

  • shape: list of positive integers specifying the size along each dimensions of the array

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

generate an array of uninitialized Complex values with the specified shape

Parameters

  • shape: list of positive integers specifying the size along each dimensions of the array
  • as_complex: desired scalar type

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

generate an array of Complex values filled with zeros and the specified shape

Parameters

  • shape: list of positive integers specifying the size along each dimensions of the array

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

generate an array of Complex values filled with zeros and the specified shape

Parameters

  • shape: list of positive integers specifying the size along each dimensions of the array
  • as_complex: desired scalar type

Constructors

ComplexTensor(const ComplexTensor tensor) -> ComplexTensor

Constructs a multidimensionnal array of ComplexTensor by copying another one. Supports up to Complex dimensions.

Parameters

  • tensor: The tensor to copy.

Symbols

NameDescription
*Element-wise multiplication of Complex tensors or tensor-scalar multiplication.
+Element-wise addition of Complex tensors or tensor-scalar addition.
-Element-wise subtraction of Complex tensors or tensor-scalar subtraction.
/Element-wise division of Complex tensors or tensor-scalar division.
=Assigns a ComplexTensor to another one.
[]Access an element of a Complex tensor by index.

Members

NameDescription
contractContract two tensors along specified dimensions.
contract_conjugateContract two tensors with complex conjugation of the left-hand side.
factorizeFactorize the array into component arrays with the specified options
flattenFlatten a Complex tensor into a 1D vector by reshaping all elements into a single dimension.
is_approxCheck if two Complex tensors are approximately equal within a tolerance.
orderGet the number of dimensions of a Complex tensor.
reshapedCreate a copy of a Complex tensor with a new shape.
shapeGet the shape (size along each dimension) of a Complex tensor.
squeezeSqueeze a Complex tensor by removing all dimensions of size 1.
transposeTranspose a Complex tensor by reordering its dimensions.