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

Set summed bin without data to fill_value #364

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

zxdawn
Copy link
Member

@zxdawn zxdawn commented May 28, 2021

The get_sum() function doesn't accept the fill_value kwarg and will raise error. We can set it as kwrgs with the np.nan default value.

So, if there's no input of fill_value, summation will be 0 for bins without data. If the fill_value exists, then set it to fill_value.

@codecov
Copy link

codecov bot commented May 31, 2021

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (a5bc062) 94.05% compared to head (f4e0f69) 94.04%.

Files Patch % Lines
pyresample/bucket/__init__.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #364      +/-   ##
==========================================
- Coverage   94.05%   94.04%   -0.01%     
==========================================
  Files          90       90              
  Lines       13575    13578       +3     
==========================================
+ Hits        12768    12770       +2     
- Misses        807      808       +1     
Flag Coverage Δ
unittests 94.04% <80.00%> (-0.01%) ⬇️

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

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

@coveralls
Copy link

coveralls commented May 31, 2021

Coverage Status

coverage: 93.643% (-0.006%) from 93.649%
when pulling f4e0f69 on zxdawn:sum_fillvalue
into a5bc062 on pytroll:main.

@djhoese
Copy link
Member

djhoese commented Mar 22, 2022

@zxdawn or @pnuu is this still useful or needed? It looks like we missed reviewing this and I have typically stayed away from bucket resampler changes as I don't understand most of it.

@zxdawn
Copy link
Member Author

zxdawn commented Mar 22, 2022

I suppose so. Because get_min, get_max, get_average, and get_fractions all have this option.

@mraspaud
Copy link
Member

@pnuu could you have a look here?

@pnuu
Copy link
Member

pnuu commented Dec 13, 2023

Will do after my current endeavor with reader warnings.

Copy link
Member

@pnuu pnuu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general looks good, just needs the conflicts to be resolved and a test case.

@pnuu
Copy link
Member

pnuu commented Dec 15, 2023

Oh no, the code has changed so much that resolving the conflicts will take some time 🙈

@pnuu
Copy link
Member

pnuu commented Dec 15, 2023

At least the existing tests now pass (locally).

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a test for this?

@pnuu
Copy link
Member

pnuu commented Dec 15, 2023

Yes, there should. @zxdawn do you have time to add something? I might have some time on monday, just need to remember...

@mraspaud
Copy link
Member

I'll turn this into a draft for now then.

@mraspaud mraspaud marked this pull request as draft December 15, 2023 13:06
@zxdawn
Copy link
Member Author

zxdawn commented Dec 15, 2023

Maybe I have some time on Sunday or Tuesday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

get_sum not matched with bucket_sum
5 participants