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

[Docs] Python API: dtype.to_numpy() has documentation for .from_numpy() #297

Closed
dmeaux opened this issue Feb 11, 2025 · 1 comment
Closed
Assignees
Labels
documentation Improvements or additions to documentation max-repo

Comments

@dmeaux
Copy link

dmeaux commented Feb 11, 2025

Where is the problem?

https://docs.modular.com/max/api/python/dtype#max.dtype.DType.to_numpy

What can we do better?

Currently reads:

to_numpy()

to_numpy() → dtype

Converts a NumPy dtype to the corresponding DType.

  • Parameters:

    dtype (np.dtype) – The NumPy dtype to convert.

  • Returns:

    The corresponding DType enum value.

  • Return type:

    DType

  • Raises:

    ValueError – If the input dtype is not supported.


Should read something like:

to_numpy()

to_numpy() → dtype

Converts a DType to the corresponding NumPy dtype.

  • Returns:

    The corresponding NumPy dtype.

  • Return type:

    np.dtype

  • Raises:

    ValueError – If the input dtype is not supported.

Anything else?

No response

@dmeaux dmeaux added the documentation Improvements or additions to documentation label Feb 11, 2025
@goldiegadde goldiegadde added the max-repo label Feb 18, 2025 — with Linear
@scottamain scottamain self-assigned this Feb 19, 2025
Copy link
Collaborator

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation max-repo
Projects
None yet
Development

No branches or pull requests

3 participants