fix: weights should not be raised to the power n in the n-th moment calculation#3729
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
🚀 New features to boost your workflow:
|
|
The documentation preview is ready to be viewed at http://preview.awkward-array.org.s3-website.us-east-1.amazonaws.com/PR3729 |
pfackeldey
left a comment
There was a problem hiding this comment.
Thanks for the fix @ikrommyd, this is correct. The weight is not supposed to be taken to the power of n in the moment calculation.
Can you add the original issue as a test case? @T90REAL added nicely already the manual calculation for the expected moment, I'd suggest to just copy and paste this into a test case. Apparently there wasn't any test for this until now...
Afterwards we can merge this fix 👍
|
Done @pfackeldey! Should be good |
Closes #3722