Skip to content

gaspari_cohn: allow passing xr.DataArray#298

Merged
mathause merged 7 commits into
MESMER-group:mainfrom
mathause:gc_allow_dataarray
Sep 21, 2023
Merged

gaspari_cohn: allow passing xr.DataArray#298
mathause merged 7 commits into
MESMER-group:mainfrom
mathause:gc_allow_dataarray

Conversation

@mathause
Copy link
Copy Markdown
Member

@mathause mathause commented Sep 21, 2023

  • Closes #xxx
  • Tests added
  • Passes isort . && black . && flake8
  • Fully documented, including CHANGELOG.rst

Allow passing xr.DataArray to gaspari_cohn. Maybe this needs a check such that no Dataset is passed? - Done.

This was motivated by looking at #109 again.

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 21, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.05% 🎉

Comparison is base (bcbf5c9) 86.73% compared to head (76d9914) 86.79%.

❗ Current head 76d9914 differs from pull request most recent head f96579f. Consider uploading reports for the commit f96579f to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #298      +/-   ##
==========================================
+ Coverage   86.73%   86.79%   +0.05%     
==========================================
  Files          38       38              
  Lines        1561     1568       +7     
==========================================
+ Hits         1354     1361       +7     
  Misses        207      207              
Flag Coverage Δ
unittests 86.79% <100.00%> (+0.05%) ⬆️

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

Files Changed Coverage Δ
mesmer/core/computation.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread mesmer/core/computation.py Outdated
Comment thread mesmer/core/computation.py Outdated
Comment thread tests/unit/test_computation.py Outdated
Comment thread tests/unit/test_computation.py Outdated
@mathause
Copy link
Copy Markdown
Member Author

Obviously it does not matter a bit but I like the solution I found for supporting numpy arrays and xr.DataArray. I don't think computation is a very good location for the function but I could not come up with a good name now (stats.kernels? - but is it a kernel?, stats.covariance sounds strange).

Comment thread CHANGELOG.rst Outdated
@mathause mathause merged commit 5a03e98 into MESMER-group:main Sep 21, 2023
@mathause mathause deleted the gc_allow_dataarray branch September 21, 2023 18:55
mathause added a commit that referenced this pull request Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant