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

Update np.float_ and np.complex_ to match Numpy 2.0. #68271

Merged
merged 1 commit into from
May 20, 2024

Conversation

copybara-service[bot]
Copy link

Update np.float_ and np.complex_ to match Numpy 2.0.

Numpy 2.0 removed the aliases np.float_ and np.complex_. Direct usages of np.float_ and np.complex_ are replaced with np.float64 and np.complex128, respectively.
See numpy/numpy#24743 and https://numpy.org/devdocs/numpy_2_0_migration_guide.html#changes-to-namespaces.

Consistent with JAX, TF retains dtype wrappers for float_ and complex_. This is considered useful for determining the default float/complex type, providing compatibility with older code that might still rely on these aliases.

Numpy 2.0 removed the aliases np.float_ and np.complex_. Direct usages of np.float_ and np.complex_ are replaced with np.float64 and np.complex128, respectively.
See numpy/numpy#24743 and https://numpy.org/devdocs/numpy_2_0_migration_guide.html#changes-to-namespaces.

Consistent with JAX, TF retains dtype wrappers for float_ and complex_. This is considered useful for determining the default float/complex type, providing compatibility with older code that might still rely on these aliases.

PiperOrigin-RevId: 635502855
@copybara-service copybara-service bot merged commit 0f3594e into master May 20, 2024
@copybara-service copybara-service bot deleted the exported_pr_635468201 branch May 20, 2024 18:02
@jakirkham jakirkham mentioned this pull request May 29, 2024
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.

None yet

1 participant