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

DOC: Improved documentation for numpy.frombuffer #23556

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

selamw1
Copy link
Contributor

@selamw1 selamw1 commented Sep 10, 2024

Part of #21461

Copy link
Collaborator

@jakevdp jakevdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! A few comments below

jax/_src/numpy/lax_numpy.py Outdated Show resolved Hide resolved
jax/_src/numpy/lax_numpy.py Outdated Show resolved Hide resolved
jax/_src/numpy/lax_numpy.py Show resolved Hide resolved
Copy link
Collaborator

@jakevdp jakevdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@google-ml-butler google-ml-butler bot added kokoro:force-run pull ready Ready for copybara import and testing labels Sep 12, 2024
def frombuffer(buffer: bytes | Any, dtype: DTypeLike = float,
count: int = -1, offset: int = 0) -> Array:
"""Convert a buffer into a 1-D JAX array.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should fix the test failure:

Suggested change
"""Convert a buffer into a 1-D JAX array.
r"""Convert a buffer into a 1-D JAX array.

@selamw1
Copy link
Contributor Author

selamw1 commented Sep 13, 2024

Doc test failure fixed.

@jakevdp
Copy link
Collaborator

jakevdp commented Sep 13, 2024

The current error is due to jaxlib 0.4.32 being yanked. If you rebase on the updated main branch, then tests should pass. Thanks!

@selamw1
Copy link
Contributor Author

selamw1 commented Sep 13, 2024

rebased from the updated main branch.

Copy link
Collaborator

@jakevdp jakevdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, a couple more tweaks

jax/_src/numpy/lax_numpy.py Outdated Show resolved Hide resolved
jax/_src/numpy/lax_numpy.py Show resolved Hide resolved
jax/_src/numpy/lax_numpy.py Outdated Show resolved Hide resolved
description_changed_examp_added

doc_byte_fixed

discription_modified
@selamw1
Copy link
Contributor Author

selamw1 commented Sep 16, 2024

@jakevdp
Description modified and link added.

Copy link
Collaborator

@jakevdp jakevdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@copybara-service copybara-service bot merged commit 90f532a into jax-ml:main Sep 16, 2024
13 of 14 checks passed
@selamw1 selamw1 deleted the docstring_frombuffer branch September 20, 2024 20:29
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