Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #83 +/- ##
==========================================
+ Coverage 43.09% 43.77% +0.68%
==========================================
Files 11 11
Lines 478 466 -12
==========================================
- Hits 206 204 -2
+ Misses 272 262 -10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
289368c to
2575f1b
Compare
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.
Also fixes a bug/testing issue with Pandas 3.0, which enables copy-on-write by default. This is a breaking change where:
pd.Index() (the constructor) now copies numpy arrays by default instead of sharing memory
xarray uses pandas.Index internally for dimension coordinates (coordinates whose name matches their sole dimension, like z in coords={'z': (['z'], z_array)})
This broke the memory sharing chain: original numpy array → xarray (via pandas Index) → pvxarray → VTK/PyVista
The key distinction: non-dimension coordinates (like lon: (['x'], lon_array) where the coord name "lon" differs from the dimension name "x") are NOT stored in a pandas Index, so they still share memory.
Fix
Updated the shared memory tests to verify zero-copy between what xarray provides (da["coord"].values) and the PyVista mesh (which pvxarray controls), rather than between the original numpy array and the mesh (which depends on pandas internal behavior).
This properly validates that pvxarray doesn't introduce any copies in the xarray → VTK/PyVista chain, while accepting that pandas 3.0's Index behavior is outside pvxarray's control.