Repository navigation
Conversation
ianthomas23
reviewed
Oct 1, 2026
| # No triangulation specified, so use matplotlib._qhull to obtain | ||
| # Delaunay triangulation. | ||
| self.triangles, self._neighbors = _qhull.delaunay(x, y, sys.flags.verbose) | ||
| self.triangles, self._neighbors = _qhull.delaunay(self.x, self.y, |
Member
There was a problem hiding this comment.
This is a good catch. It is functionally identical but will be slightly faster in some circumstances so we should do it even if this PR is never merged.
1 task done
iccir
force-pushed
the
nanobind-experiment
branch
from
October 3, 2026 16:01
6821644 to
275423c
Compare
Accept arrays of any shape so we can do our own validation and provide better error messages. This restores most of the test_triangulation test suite to the pre-nanobind version.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR summary
I'm tinkering with nanobind to re-acquaint myself with C++ after a 20+ year hiatus. This is a draft pull request so I can run CI on my experiments.
Results
Binary Size Comparison
(darwin, arm64)
(Split Mode)
(Split Mode)
_backend_agg_c_internal_utils_image_path_qhull_tkagg_trift2fontResults: ~1.33M saved per wheel by switching to nanobind and ~1.88M if we use Split Mode.
Note: Split Mode adds a dependency on nanobind-backend. This is an 80K-450K download depending on architecture and is shared amongst all projects in an environment that use nanobind split mode.
Compilation Time Comparison
_backend_agg_c_internal_utils_image_path_qhull_tkagg_trift2fontAI Disclosure
PR quality check