MAINT: simplify view implementations in MaskedArray and recarray. by mhvk · Pull Request #31317 · numpy/numpy · GitHub
Skip to content

MAINT: simplify view implementations in MaskedArray and recarray.#31317

Open
mhvk wants to merge 1 commit intonumpy:mainfrom
mhvk:view-refactor-follow-up
Open

MAINT: simplify view implementations in MaskedArray and recarray.#31317
mhvk wants to merge 1 commit intonumpy:mainfrom
mhvk:view-refactor-follow-up

Conversation

@mhvk
Copy link
Copy Markdown
Contributor

@mhvk mhvk commented Apr 23, 2026

These are possible after the changes in ndarray.view() in #31234 (and taken from the initial version of #31271). Also used the occasion to do super().view rather than calling ndarray.view (which predates the introduction of super in python...).

No AI used.

Possible after the changes in ndarray.view().
Comment thread numpy/ma/core.py
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This protection of the mask is not actually needed, as __array_finalize__ already ensures it is a view (in fact, a double view given the reshape).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant