Skip to main content

delta_tensor

Overloads

NameDescription
delta_tensor(const List<integer> shape) -> ComplexTensorgenerate a delta-array of Complex with the specified shape. The delta array is one if all indices have the same value, zero otherwise.
delta_tensor(const List<integer> shape, as_real as_real) -> RealTensorgenerate a delta-array of Real with the specified shape. The delta array is one if all indices have the same value, zero otherwise.
delta_tensor(const List<integer> shape, as_complex as_complex) -> ComplexTensorgenerate a delta-array of Complex with the specified shape. The delta array is one if all indices have the same value, zero otherwise.

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_real as_real) -> RealTensor

generate a delta-array of Real 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_real: desired scalar type

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