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 repr for empty jax.Array #19667

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

jakevdp
Copy link
Collaborator

@jakevdp jakevdp commented Feb 5, 2024

Before:

>>> jnp.empty((0, 5))
Array([], dtype=float32)

After:

>>> jnp.empty((0, 5))
Array([], shape=(0, 5), dtype=float32)

Compare to recent versions of numpy:

>>> np.empty((0, 5))
array([], shape=(0, 5), dtype=float64)

@jakevdp jakevdp self-assigned this Feb 5, 2024
@google-ml-butler google-ml-butler bot added kokoro:force-run pull ready Ready for copybara import and testing labels Feb 5, 2024
@copybara-service copybara-service bot merged commit b53f757 into jax-ml:main Feb 5, 2024
13 checks passed
@jakevdp jakevdp deleted the array-empty-repr branch February 5, 2024 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull ready Ready for copybara import and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants