heat icon indicating copy to clipboard operation
heat copied to clipboard

Support basic xarray-functionality

Open mrfh92 opened this issue 1 year ago • 9 comments

Description

In this PR we add a class DXarray that is somehow similar to xarray.DataArray but with heat.DNDarray's instead of numpy arrays; whenever possible, we use existing Heat-operations or process-local xarray-operations.

So far implemented:

  • class DXarray
  • interoperability: .xarray() (DXarray to xarray), from_xarray() (xarray to DXarray)
  • basic array manipulation: resplit_ (in place resplit of DXarray), balance_ (in place balacing of DXarray)
  • miscellaneous: print

To be done (for the beginning):

  • I/O (which formats?)
  • basic statistics, or --more general-- functions that operate on the data part of a DXarray only
  • checkout how more complex operations requiring interaction of data part and coordinates (e.g. interpolation etc.) can be done using xarray as process-local compute engine
  • how to handle date-time-coordinates (pandas data frames)?
  • ...

Due Diligence

  • General:
    • [X] base branch must be main for new features, latest release branch (e.g. release/1.3.x) for bug fixes
    • [X] title of the PR is suitable to appear in the Release Notes
  • Implementation:
    • [ ] unit tests: all split configurations tested
    • [ ] unit tests: multiple dtypes tested
    • [ ] documentation updated where needed

mrfh92 avatar Jul 26 '23 11:07 mrfh92

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

ghost avatar Jul 26 '23 11:07 ghost

@mtar I tried to change benchmark_main.yml, benchmark_pr.yml, and ci.yml in order to install xarray in the CI, but it did not work as expected.

mrfh92 avatar Jul 26 '23 12:07 mrfh92

Thank you for the PR!

github-actions[bot] avatar Jul 27 '23 13:07 github-actions[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.10%. Comparing base (1263887) to head (960bf6f). Report is 482 commits behind head on main.

:exclamation: Current head 960bf6f differs from pull request most recent head 23e5cc6

Please upload reports for the commit 23e5cc6 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1183      +/-   ##
==========================================
- Coverage   91.83%   90.10%   -1.74%     
==========================================
  Files          77       79       +2     
  Lines       11191    10952     -239     
==========================================
- Hits        10277     9868     -409     
- Misses        914     1084     +170     
Flag Coverage Δ
unit 90.10% <0.00%> (-1.74%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jul 27 '23 15:07 codecov[bot]

Thank you for the PR!

github-actions[bot] avatar Sep 26 '23 13:09 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Sep 26 '23 13:09 github-actions[bot]

This pull request is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Feb 19 '24 02:02 github-actions[bot]

This pull request is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Jun 17 '24 02:06 github-actions[bot]

This pull request is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Aug 26 '24 02:08 github-actions[bot]