Tensor
- class libadcc.Tensor(self: libadcc.Tensor, arg0: libadcc.Symmetry) None
Bases:
pybind11_builtins.pybind11_object
Construct a Tensor object using a Symmetry object describing its symmetry properties. The returned object is not guaranteed to contain initialised memory. Python binding to
libadcc::Tensor
Attributes Summary
Does the tensor need evaluation or is it fully evaluated and resilient in memory.
Methods Summary
antisymmetrise
(*args, **kwargs)Overloaded function.
copy
(self)Returns a deep copy of the tensor.
describe_expression
(*args, **kwargs)Overloaded function.
describe_symmetry
(self)Return a string providing a hopefully descriptive representation of the symmetry information stored inside the tensor.
diagonal
(self, *args)dot
(*args, **kwargs)Overloaded function.
empty_like
(self)evaluate
(self)Ensure the tensor to be fully evaluated and resilient in memory.
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
(*args, **kwargs)Overloaded function.
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
- T
- flags
- mutable
- ndim
- needs_evaluation
Does the tensor need evaluation or is it fully evaluated and resilient in memory.
- shape
- size
- space
- subspaces
Methods Documentation
- antisymmetrise(*args, **kwargs)
Overloaded function.
antisymmetrise(self: libadcc.Tensor, arg0: list) -> libadcc.Tensor
antisymmetrise(self: libadcc.Tensor, *args) -> libadcc.Tensor
- copy(self: libadcc.Tensor) libadcc.Tensor
Returns a deep copy of the tensor.
- describe_expression(*args, **kwargs)
Overloaded function.
describe_expression(self: libadcc.Tensor, arg0: str) -> str
Return a string providing a hopefully descriptive representation of the tensor expression stored inside the object.
describe_expression(self: libadcc.Tensor) -> str
- describe_symmetry(self: libadcc.Tensor) str
Return a string providing a hopefully descriptive representation of the symmetry information stored inside the tensor.
- diagonal(self: libadcc.Tensor, *args) libadcc.Tensor
- dot(*args, **kwargs)
Overloaded function.
dot(self: libadcc.Tensor, arg0: libadcc.Tensor) -> float
dot(self: libadcc.Tensor, arg0: list) -> numpy.ndarray[numpy.float64]
- empty_like(self: libadcc.Tensor) libadcc.Tensor
- evaluate(self: libadcc.Tensor) libadcc.Tensor
Ensure the tensor to be fully evaluated and resilient in memory. Usually happens automatically when needed. Might be useful for fine-tuning, however.
- 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: numpy.ndarray) -> libadcc.Tensor
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[numpy.float64], arg1: float) -> libadcc.Tensor
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) libadcc.Tensor
Set all tensor elements to random data, adhering to the internal symmetry.
- symmetrise(*args, **kwargs)
Overloaded function.
symmetrise(self: libadcc.Tensor, arg0: list) -> libadcc.Tensor
symmetrise(self: libadcc.Tensor, *args) -> libadcc.Tensor
- to_ndarray(self: libadcc.Tensor) numpy.ndarray[numpy.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