Skip to content
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

gaspari_cohn: allow passing xr.DataArray #298

Merged
merged 7 commits into from
Sep 21, 2023

Conversation

mathause
Copy link
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

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.

mesmer/core/computation.py Outdated Show resolved Hide resolved
mesmer/core/computation.py Outdated Show resolved Hide resolved
tests/unit/test_computation.py Outdated Show resolved Hide resolved
tests/unit/test_computation.py Outdated Show resolved Hide resolved
@mathause
Copy link
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).

CHANGELOG.rst Outdated Show resolved Hide resolved
@mathause mathause merged commit 5a03e98 into MESMER-group:main Sep 21, 2023
4 of 5 checks passed
@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