GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fully adopt `mpl::array` and `mpl::defer` by iccir · Pull Request #32536 · matplotlib/matplotlib

Conversation

@iccir

@iccir iccir commented Oct 24, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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.

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.

All reactions
@github-actions github-actions Bot added topic: path handling topic: images topic: text/fonts topic: contour topic: tri labels Oct 24, 2026
@iccir iccir added the status: waiting for other PR label Oct 24, 2026
@iccir
Fully adopt mpl::array and mpl::defer
4202b36
@iccir
iccir force-pushed the pybind-mplarray branch from c417c91 to 4202b36 Compare October 26, 2026 18:00
iccir added 2 commits October 28, 2026 07:59
@iccir
Cleanup 1D case in transform_affine()
a70676f
# Conflicts:
#	src/_path.h
@iccir
Convert agg and path to mpl::array, remove unused code
7176460
@github-actions github-actions Bot added backend: agg topic: transforms and scales labels Oct 29, 2026
@iccir iccir mentioned this pull request Oct 29, 2026
Introduce mpl::array and mpl::defer #32532
Open
2 tasks done
iccir added 3 commits October 30, 2026 09:47
@iccir
Fix comment
a5f5e39
@iccir
hatchcolors should be an std::optional
7d278a0
@iccir
Port tkagg to use mpl::array
944d4fa
@github-actions github-actions Bot added the GUI: tk label Oct 30, 2026
@iccir iccir mentioned this pull request Oct 30, 2026
nanobind Umbrella #32560
Open
iccir added 3 commits November 1, 2026 08:20
@iccir
Port convert_polygon_vector and Py_cleanup_path
4aacf36
@iccir
Adopt mpl::array in ft2font
5f2f49f
@iccir
We don't need asarray() until nanobind
95ac539
@iccir iccir added this to nanobind Nov 2, 2026
@github-project-automation github-project-automation Bot moved this to Todo in nanobind Nov 2, 2026
@iccir iccir moved this from Todo to In Progress in nanobind Nov 2, 2026
@github-actions github-actions Bot added the status: needs rebase label Nov 3, 2026
@iccir
Merge branch 'main' of https://github.com/matplotlib/matplotlib into …
dd73e17
…pybind-mplarray

# Conflicts:
#	lib/matplotlib/transforms.py
#	src/_path.h
#	src/_path_wrapper.cpp
@github-actions github-actions Bot removed the status: needs rebase label Nov 5, 2026
@iccir
Fix _tri types
96ffd9e
@iccir iccir mentioned this pull request Nov 8, 2026
Replace pybind11 type casters with mpl::convert #32581
Draft
2 tasks done
@iccir
Fix remaining mypy errors
44cf68f
@iccir
Use Specialize handle_type_name for mpl::defer<mpl::array>
d643a58
@iccir
iccir force-pushed the pybind-mplarray branch from 2ba2acb to d643a58 Compare November 11, 2026 04:40
iccir added 2 commits November 10, 2026 21:02
@iccir
Add missing reference for draw_glyph_to_bitmap
fcec5d8
@iccir
Test "numpy.ndarray" instead for docs
26d4d06

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

backend: agg GUI: tk status: waiting for other PR topic: contour topic: images topic: path handling topic: text/fonts topic: transforms and scales topic: tri

Projects

nanobind
Status: In Progress

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.

1 participant

@iccir
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.