Skip to content

Commit 834c1fa

Browse files
committed
unpack compressed tuples
1 parent f0a7308 commit 834c1fa

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/pynxtools/dataconverter/helpers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,8 @@ def is_value_valid_element_of_enum(value, elist) -> tuple[bool, list]:
717717

718718
def is_valid_data_type(value: Any, accepted_types: Sequence) -> bool:
719719
"""Checks whether the given value or its children are of an accepted type."""
720+
if isinstance(value, tuple) and len(value) == 1:
721+
value = value[0]
720722
if not isinstance(value, np.ndarray):
721723
value = np.array(value)
722724
# Handle 'object' dtype separately (for lists from HDF5 files)

src/pynxtools/dataconverter/validation.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,6 @@ def best_namefit_of(
243243
best_match = node
244244
best_score = score
245245

246-
# if hint:
247-
# print(hint, node, name)
248-
249246
return best_match
250247

251248
# Only cache based on path. That way we retain the nx_class information

0 commit comments

Comments
 (0)