GeezerVison is showing github.com — Fully adopt `mpl::array` and `mpl::defer` by iccir · Pull Request #32536 · matplotlib/matplotlib
Conversation
iccir
commented
Oct 24, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
PR summary
This PR converts the remainder of our py::array usage to mpl::array.
Naming Conventions
This PR attempts to make variable names and class member names consistent. We previously assigned "no suffix" to the pybind11 unchecked_reference proxy objects. In this PR, I assigned "no suffix" to mpl::array and use an _obj suffix for the raw incoming objects:
| Type / Call |
Variable Name |
mpl::defer<FooArray> or std::optional<mpl::defer<…>> |
foo_obj |
FooArray |
foo |
foo_arr.data() |
foo_data |
Tri Changes
(Talk about the change from empty tuples to None.)
Not Changed
The following still use py::array due to dtype specialization. They will eventually use nb::ndarray:
_path.is_sorted_and_has_non_nan()
_image.resample()
AI Disclosure
- I use AI for web search due to search engines becoming less reliable.
PR quality check
- Use an expressive title, e.g. "Fix title font property precedence"
- New and changed code is tested
- [/] Plotting related features are demonstrated in an example
- [/] New features and API changes have release notes
- [/] Documentation complies with general and docstring guidelines
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
# Conflicts:
# src/_path.h
…pybind-mplarray
# Conflicts:
# lib/matplotlib/transforms.py
# src/_path.h
# src/_path_wrapper.cpp
This branch has not been deployed
No deployments
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.