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

Improve json serialization to accomodate numpy float32 #3028

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

YuanTingHsieh
Copy link
Collaborator

@YuanTingHsieh YuanTingHsieh commented Oct 10, 2024

Since numpy 2.0, some type promoting rules are different: https://numpy.org/devdocs/numpy_2_0_migration_guide.html#changes-to-numpy-data-type-promotion

Description

  • Change to always cast np.float32 to np.float64 (for serialization) before calling json.dump

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Quick tests passed locally by running ./runtest.sh.
  • In-line docstrings updated.
  • Documentation updated.

@YuanTingHsieh
Copy link
Collaborator Author

/build

@YuanTingHsieh
Copy link
Collaborator Author

/build

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

Successfully merging this pull request may close these issues.

3 participants