btensor.tensor.Cotensor

btensor.tensor.Cotensor(data, basis=None, variance=None, name=None, numpy_compatible=True, copy_data=True)[source]

A helper function to create tensors with default variance 1 (covariant).

Parameters
  • data (ArrayLike) – NumPy array containing the representation of the cotensor.

  • basis (NBasis | None) – Basis object or tuple of Basis objects, representing the Basis along each axis of the input data. Default: nobasis along each axis.

  • variance (Sequence[int] | None) – Variance along each dimension. Default: 1.

  • name (str | None) – Name of the cotensor. Default: ‘Basis<ID>’ where <ID> is the ID of the basis.

  • numpy_compatible (bool) – If True, the tensor can be used in standard NumPy function calls. The basis of the tensor will however not be taken into consideration and no automatic basis transformations will be performed. Default: True.

  • copy_data (bool) – If False, no copy of the NumPy data will be created. Default: True.

Return type

Tensor