Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Feature/weighted #2922
Feature/weighted #2922
Changes from 8 commits
0f2da8e
5f64492
685e5c4
c9d612d
a20a4cf
26c24b6
f3c6758
25c3c29
5d37d11
b1c572b
d1d1f2c
6be1414
059263c
8b1904b
8cad145
49d4e43
527256e
739568f
f01305d
2e3880d
ae8d048
dc7f605
c646568
e2ad69e
bd4f048
3c7695a
ef07edd
064b5a9
fec1a35
72c7942
0e91411
1eb2913
118dfed
e08c921
0fafe0b
a8d330d
ae0012f
111259b
5afc6f3
668b54b
d877022
ead681e
c4598ba
866fba5
3cc00c1
8f34167
9f0a8cd
98929f1
62c43e6
2e8aba2
d14f668
7fa78ae
3ebb9d4
f01d47a
4b184f6
1e06adc
706579a
b2718db
4c17108
8acc78e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe remove as
xr.dot
does not provide thisThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree re removing (or am I missing something—why was this here?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency it would be nice to offer
axis
here. Originallysum
was implemented as(weights * da).sum(...)
and we gotaxis
for free. Withdot
it is not as straightforward any more. Honestly, I never useaxis
with xarray, so I suppose it is fine to only implement it if anyone would ever request it...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Unless I'm missing something, let's remove
axis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If
weights
has an additional dimension to those ofself.obj
,masked_weight
may consume large memory.Can we avoid this for example by separating
mask
fromweights
?Do you think if the above is worth doing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done - I do not have any performance tests (memory or speed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the same reason above,
may work if
skipna
isTrue
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done - I do not have any performance tests (memory or speed)