Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

[WIP] Add typed ops #24

Merged
merged 7 commits into from
Sep 2, 2021
Merged

[WIP] Add typed ops #24

merged 7 commits into from
Sep 2, 2021

Conversation

TomNicholas
Copy link
Member

Adds the operations defined in xarray.core._typed_ops.py, such as __add__ and __mul__.

There is one test (for multiplication), but for reasons I don't understand it works when doing dt * 5 but fails for dt * dt.

@TomNicholas TomNicholas changed the title Add typed ops [WIP] Add typed ops Aug 25, 2021
@TomNicholas
Copy link
Member Author

TomNicholas commented Sep 2, 2021

After #32 this now works easily! I've also refactored so that the long lists of methods to copy all live in their own ops.py file.

@TomNicholas TomNicholas merged commit 977ffe2 into main Sep 2, 2021
@TomNicholas TomNicholas deleted the typed_ops branch September 2, 2021 16:15
flamingbear pushed a commit to flamingbear/rewritten-datatree that referenced this pull request Jan 19, 2024
* added methods from xarray.core._typed_ops.py to list to map over

* test ops with non-datatrees acting on datatrees

* removed the xfails

* refactored ops out into new file

* linting

* minimise imports of xarray internals
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant