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

ENH: Allow creating structured void scalars by passing dtype #22316

Merged
merged 2 commits into from Nov 21, 2022

Commits on Sep 21, 2022

  1. ENH: Allow creating structured void scalars by passing dtype

    Adds an optional `dtype=` kwarg to `np.void`.  If given (and not None),
    this kwarg effectively turns it into:
    
         res = np.array(data, dtype=dtype)[()]
    
    Thanks for Marten's review and Bas' help with the typing.
    
    Reviewed-by: Marten van Kerkwijk <mhvk@astro.utoronto.ca>
    Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
    seberg and BvB93 committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    519ce63 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2022

  1. DOC: Update np.void docs based on Matti's comments

    Co-authored-by: Matti Picus <matti.picus@gmail.com>
    seberg and mattip committed Nov 21, 2022
    Configuration menu
    Copy the full SHA
    7404cb6 View commit details
    Browse the repository at this point in the history