convert int-like values silently into float-like for NX_FLOAT #637
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed with @lukaspie, I believe we should not be strict with NX_FLOAT and convert int-like values into float-like values silently. I don't see any case where this would cause an issue, but if NX_FLOAT values are encoded as ints in some source file, it can be difficult to change this in the writing process. One example is the example E1 from pynxtools_mpes https://github.com/FAIRmat-NFDI/pynxtools-mpes/blob/60aa3d5724f7a1578287cb1331008a47c95c91ae/src/pynxtools_mpes/nomad/examples/E1%20Convert%20to%20NeXus.ipynb where one NX_FLOAT value is encoded as int in the hdf5 source file.
This PR adds a conversion function and respective tests.
Closes #523