Repository navigation
Conversation
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.
Make the input arrays' element types const. The triangulation code only reads the vertices and ring boundaries, but their current nanobind types require writable storage. Valid read-only arrays, including geometry loaded with
np.load(..., mmap_mode="r"), therefore raiseTypeError.Both input aliases now use
nb::ndarray<const T, ...>, following nanobind's read-only array convention. Shapes, supported numeric types, strided access and the returned uint32 indices stay the same.Add 12 regressions covering read-only vertices, ring boundaries, or both, across all four coordinate dtypes. All 25 regular tests pass on Python 3.9/NumPy 1.26 and Python 3.12/NumPy 2.5, built with nanobind 2.9.2; the 12 free-threading tests are skipped in these interpreters.
An additional Natural Earth geometry audit restores all 320 failing read-only configurations, including 32 memory-mapped cache cases. Independent area and triangle-union checks pass, and all 96 writable controls keep identical indices. An extra Mypy check reports the same existing missing
__version__declaration on base and head.