-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
When generating a pydantic model to represent the standard tomo loader config, I noticed that the rotation_angles parameter was being seen as an array of 1 element. This is because RawAngles is a NamedTuple:
httomo/httomo/loaders/types.py
Lines 9 to 14 in 584e15c
| class RawAngles(NamedTuple): | |
| """ | |
| Configure rotation angle values to come from a dataset within the input NeXuS/hdf5 file. | |
| """ | |
| data_path: str |
and a NamedTuple has the ability to access elements by a zero-based index (like a normal tuple).
This way of accessing the single entry in RawAngles isn't particularly useful in any way, so is unnecessary. Accessing values via the keys in the dict is the only way that makes much sense for RawAngles, therefore, a TypedDict seems like a more sensible type for it.
Metadata
Metadata
Assignees
Labels
No labels