-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expose "Coordinates" as part of Xarray's public API #7368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 67 commits
Commits
Show all changes
76 commits
Select commit
Hold shift + click to select a range
41f4fd8
add indexes argument to Dataset.__init__
benbovy 4baa8af
make indexes arg public for DataArray.__init__
benbovy dbc058a
Indexes constructor updates
benbovy 16a9983
use the generic Mapping[Any, Index] for indexes
benbovy 3c076d5
add wrap_pandas_multiindex function
benbovy 70e7a5d
do not create default indexes when not desired
benbovy 00e1766
fix Dataset dimensions
benbovy 3bf92cd
copy the coordinate variables of passed indexes
benbovy c9b6363
DataArray: check dimensions/shape of index coords
benbovy 82dc5cc
docstrings tweaks
benbovy a58c9d0
more Indexes safety
benbovy 9beeea7
ensure input indexes are Xarray indexes
benbovy c6e94b4
add .assign_indexes() method
benbovy ddd505e
Merge branch 'main' into indexes-arg-constructors
benbovy f97adb5
add `IndexedCoordinates` subclass
benbovy 45709ef
rollback/update Dataset and DataArray constructors
benbovy 4c559f1
update docstrings
benbovy 1192948
fix Dataset creation internal error
benbovy a877a74
add IndexedCoordinates.merge_coords
benbovy 9d6d2ae
drop IndexedCoordinates and reuse Coordinates
benbovy 3ee26ef
update api docs
benbovy dd02eca
make Coordinates init args optional
benbovy 0ee8f95
docstrings updates
benbovy fc6c948
convert to base variable when no index is given
benbovy 0572b96
raise when an index is given with no variable
benbovy 6f5114b
skip create default indexes...
benbovy e27830a
invariant checks: maybe skip IndexVariable checks
benbovy 1649fb8
add Coordinates tests
benbovy 298fccd
more Coordinates tests
benbovy e8c627c
add Dataset constructor tests with Coordinates
benbovy be86f87
fix mypy
benbovy 75e2523
assign_coords: do not create default indexes...
benbovy 82f0fb2
support alignment of Coordinates
benbovy 883e67c
clean-up
benbovy 28e9861
fix failing test (dataarray coords not extracted)
benbovy 9a209a3
fix tests: prevent index conflicts
benbovy 4f337e3
add Coordinates.equals and Coordinates.identical
benbovy 43ddcf6
more tests, docstrings, docs
benbovy 2437456
fix assert_* (Coordinates subclasses)
benbovy e60570f
review copy
benbovy d01cf01
another few tests
benbovy 9fc49ff
fix mypy
benbovy 7873c77
update what's new
benbovy e7998d1
Merge branch 'main' into indexes-arg-constructors-2
benbovy f7ec33e
do not copy indexes
benbovy b1a9688
add Coordinates fastpath constructor
benbovy 38fdf1e
fix sphinx directive
benbovy d9e9e34
re-add coord indexes in merge (dataset constructor)
benbovy 3999eff
create coords with default idx: try a cleaner impl
benbovy d5d8233
some useful comments for later
benbovy d2fcaa3
xr.merge: add support for Coordinates objects
benbovy 193dad3
allow skip align for object(s) in merge_core
benbovy 84c77a4
fix mypy
benbovy 5e82d61
what's new tweaks
benbovy c6409fd
align Coordinates callbacks: don't reindex data vars
benbovy 39294fc
fix Coordinates._overwrite_indexes callback
benbovy 3fc1e8c
Merge branch 'main' into indexes-arg-constructors-2
benbovy 8c65f85
remove merge_coords
benbovy cf6fcbb
futurewarning: pass multi-index via data vars
benbovy 6a6444f
review comments
benbovy 50cf057
Merge branch 'main' into indexes-arg-constructors-2
benbovy f5d1fe1
Merge branch 'main' into pr/7368
Illviljan 1759ac9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 48f6950
Fix circulat imports
Illviljan a789f6b
Merge branch 'indexes-arg-constructors-2' of https://github.com/benbo…
Illviljan fa384f7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 7628cb2
typing: add Alignable protocol class
benbovy c8821f9
try fixing mypy error (Self redefinition)
benbovy c71aadb
remove Coordinate alias of Variable
benbovy 139b13a
fix groupby test
benbovy 7ed6279
doc: remove merge_coords in api reference
benbovy 3d94357
doc: improve docstrings and glossary
benbovy 4a6e915
use Self type annotation in Coordinate class
benbovy 31f66b4
better comment
benbovy 4cb70d0
fix Self undefined error with python < 3.11
benbovy 4ef5f17
Merge branch 'main' into indexes-arg-constructors-2
dcherian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.