Simplify LabelTensor class, fix #395, add docstrings, and resolve Python 3.8 compatibility issue in tests

This commit is contained in:
FilippoOlivo
2025-01-21 10:44:35 +01:00
committed by Nicola Demo
parent 4bec5bfc9a
commit 7706ef12c3
2 changed files with 295 additions and 239 deletions

View File

@@ -7,7 +7,8 @@ data = torch.rand((20, 3))
labels_column = {1: {"name": "space", "dof": ['x', 'y', 'z']}}
labels_row = {0: {"name": "samples", "dof": range(20)}}
labels_list = ['x', 'y', 'z']
labels_all = labels_column | labels_row
labels_all = labels_column.copy()
labels_all.update(labels_row)
@pytest.mark.parametrize("labels",