Tensor¶
-
class
libadcc.
Tensor
¶ Bases:
pybind11_builtins.pybind11_object
Class representing the Tensor objects used for computations in adcc
Attributes Summary
mutable
ndim
shape
size
Methods Summary
add_linear_combination
(self, arg0, arg1)Add a linear combination of tensors to this tensor antisymmetrise_to
(self, arg0, arg1)copy
(self)Returns a deep copy of the tensor. copy_to
(self, arg0)Writes a deep copy of the tensor to another tensor describe_symmetry
(self)Return a string providing a hopefully discriptive rerpesentation of the symmetry information stored inside the tensor. dot
(*args, **kwargs)Overloaded function. empty_like
(self)is_allowed
(self, arg0)Is a particular index allowed by symmetry nosym_like
(self)ones_like
(self)select_n_absmax
(self, arg0)Select the n absolute maximal elements. select_n_absmin
(self, arg0)Select the n absolute minimal elements. select_n_max
(self, arg0)Select the n maximal elements. select_n_min
(self, arg0)Select the n minimal elements. set_from_ndarray
(*args, **kwargs)Overloaded function. set_immutable
(self)Set the tensor as immutable, allowing some optimisations to be performed. set_mask
(self, arg0, arg1)Set all elements corresponding to an index mask, which is given by a string eg. set_random
(self)Set all tensor elements to random data, adhering to the internal symmetry. symmetrise_to
(self, arg0, arg1)to_ndarray
(self)Export the tensor data to a standard np::ndarray by making a copy. transpose
(*args, **kwargs)Overloaded function. zeros_like
(self)Attributes Documentation
-
mutable
¶
-
ndim
¶
-
shape
¶
-
size
¶
Methods Documentation
-
add_linear_combination
(self: libadcc.Tensor, arg0: numpy.ndarray[float64], arg1: list) → libadcc.Tensor¶ Add a linear combination of tensors to this tensor
-
antisymmetrise_to
(self: libadcc.Tensor, arg0: libadcc.Tensor, arg1: list) → None¶
-
copy
(self: libadcc.Tensor) → libadcc.Tensor¶ Returns a deep copy of the tensor.
-
copy_to
(self: libadcc.Tensor, arg0: libadcc.Tensor) → None¶ Writes a deep copy of the tensor to another tensor
-
describe_symmetry
(self: libadcc.Tensor) → str¶ Return a string providing a hopefully discriptive rerpesentation of the symmetry information stored inside the tensor.
-
dot
(*args, **kwargs)¶ Overloaded function.
- dot(self: libadcc.Tensor, arg0: libadcc.Tensor) -> float
- dot(self: libadcc.Tensor, arg0: list) -> numpy.ndarray[float64]
-
empty_like
(self: libadcc.Tensor) → libadcc.Tensor¶
-
is_allowed
(self: libadcc.Tensor, arg0: tuple) → bool¶ Is a particular index allowed by symmetry
-
nosym_like
(self: libadcc.Tensor) → libadcc.Tensor¶
-
ones_like
(self: libadcc.Tensor) → libadcc.Tensor¶
-
select_n_absmax
(self: libadcc.Tensor, arg0: int) → list¶ Select the n absolute maximal elements.
-
select_n_absmin
(self: libadcc.Tensor, arg0: int) → list¶ Select the n absolute minimal elements.
-
select_n_max
(self: libadcc.Tensor, arg0: int) → list¶ Select the n maximal elements.
-
select_n_min
(self: libadcc.Tensor, arg0: int) → list¶ Select the n minimal elements.
-
set_from_ndarray
(*args, **kwargs)¶ Overloaded function.
- set_from_ndarray(self: libadcc.Tensor, arg0: array) -> None
Set all tensor elements from a standard np::ndarray by making a copy. Provide an optional tolerance argument to increase the tolerance for the check for symmetry consistency.
- set_from_ndarray(self: libadcc.Tensor, arg0: numpy.ndarray[float64], arg1: float) -> None
Set all tensor elements from a standard np::ndarray by making a copy. Provide an optional tolerance argument to increase the tolerance for the check for symmetry consistency.
-
set_immutable
(self: libadcc.Tensor) → None¶ Set the tensor as immutable, allowing some optimisations to be performed.
-
set_mask
(self: libadcc.Tensor, arg0: str, arg1: float) → None¶ Set all elements corresponding to an index mask, which is given by a string eg. ‘iijkli’ sets elements T_{iijkli}
-
set_random
(self: libadcc.Tensor) → None¶ Set all tensor elements to random data, adhering to the internal symmetry.
-
symmetrise_to
(self: libadcc.Tensor, arg0: libadcc.Tensor, arg1: list) → None¶
-
to_ndarray
(self: libadcc.Tensor) → numpy.ndarray[float64]¶ Export the tensor data to a standard np::ndarray by making a copy.
-
transpose
(*args, **kwargs)¶ Overloaded function.
- transpose(self: libadcc.Tensor) -> libadcc.Tensor
- transpose(self: libadcc.Tensor, arg0: tuple) -> libadcc.Tensor
-
zeros_like
(self: libadcc.Tensor) → libadcc.Tensor¶
-