In the LabelTensor class, I made the following changes:
Added the possibility to define a LabelTensor object by passing a Torch tensor and a list of DOF, which are assigned to the last dimension.
Implemented the cat method, which allows concatenation of LabelTensor objects along a specified dimension.
Re-implemented the extract method: now, if an integer or list is passed, only the last dimension is considered to improve backward compatibility with the current version and avoid unintentional errors.
Added checks on the dimensions of the input list/dictionary and tensor to ensure consistency.
In the
LabelTensor
class, I made the following changes:LabelTensor
object by passing a Torch tensor and a list of DOF, which are assigned to the last dimension.cat
method, which allows concatenation ofLabelTensor
objects along a specified dimension.extract
method: now, if an integer or list is passed, only the last dimension is considered to improve backward compatibility with the current version and avoid unintentional errors.