Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NumPy scalar support #396

Open
WilliamJamieson opened this issue Jul 27, 2023 · 0 comments
Open

NumPy scalar support #396

WilliamJamieson opened this issue Jul 27, 2023 · 0 comments

Comments

@WilliamJamieson
Copy link
Contributor

How should ASDF support handling numpy scalars?

The NEP 51 changes implemented for numpy 2.0, prompting asdf/asdf#1605 indicates that ASDF should more carefully consider how it is serializing and deserializing numpy scalars. This may become a more pressing issue when NEP 41 related changes start becoming more widely used (for things like dtype based units).

It may be worth adding a "scalar" tag/schema similar to the "ndarray" tag/schema which enables encoding the specific dtype information in addition to the scalar's value. The implementation should be very careful to fully represent the full value stored so that this case will perfectly round trip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant