Skip to content

Fully adopt mpl::array and mpl::defer - #32536

Draft
iccir wants to merge 9 commits into
matplotlib:mainfrom
iccir:pybind-mplarray
Draft

iccir wants to merge 9 commits into
matplotlib:mainfrom
iccir:pybind-mplarray

Conversation

@iccir

@iccir iccir commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

PR summary

Important

This PR depends on #32532 and will appear larger than it really is until #32532 is merged. To view the actual changes in this PR, compare pybind-mplarray-initial → pybind-mplarray.

DRAFT

This PR converts the remainder of our py::array usage to mpl::array, as appropriate. This is currently a draft so I can run CI.

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_view (which should be preferred for fast access).

Type / Call Variable Name
mpl::defer<FooArray> or
std::optional<mpl::defer<…>>
foo_obj
FooArray foo_arr
FooArray::ViewType foo
foo_arr.data() foo_data

Tri Changes

(Talk about the change from empty tuples to None.)

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

This branch has not been deployed

No deployments
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