Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/pynxtools/dataconverter/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,11 +600,12 @@ def is_value_valid_element_of_enum(value, elist) -> Tuple[bool, list]:
nx_int = (int, np.integer)
nx_float = (float, np.floating)
nx_number = nx_int + nx_float
nx_bool = (bool, np.bool_)

NEXUS_TO_PYTHON_DATA_TYPES = {
"ISO8601": (str,),
"NX_BINARY": (bytes, bytearray, np.bytes_),
"NX_BOOLEAN": (bool, np.bool_),
"NX_BOOLEAN": nx_bool,
"NX_CHAR": nx_char,
"NX_DATE_TIME": (str,),
"NX_FLOAT": nx_float,
Expand All @@ -616,7 +617,7 @@ def is_value_valid_element_of_enum(value, elist) -> Tuple[bool, list]:
complex,
np.complexfloating,
),
"NX_CHAR_OR_NUMBER": nx_char + nx_number,
"NX_CHAR_OR_NUMBER": nx_char + nx_number + nx_bool,
"NXDL_TYPE_UNAVAILABLE": (
nx_char,
), # Defaults to a string if a type is not provided.
Expand Down