-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: Add numba harmonic mean implementation #194
Conversation
Added '_sv_harmon_mean' numba implementation for calculating harmonic mean that uses calculations used within the original fortran code to get same harmonic values. Now there's a 'method' value for the main 'sv_harmonic_mean' function that allows user to switch back and forth b/w the two methods. --- Ref #193
Separate out value testing for the two methods of computing harmonic mean. The fortran values are obtained from previous discussions at #66 (comment).
Add simple test for using the new '_sv_harmon_mean' function on dummy arrays.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #194 +/- ##
==========================================
- Coverage 50.98% 50.60% -0.38%
==========================================
Files 16 16
Lines 865 905 +40
==========================================
+ Hits 441 458 +17
- Misses 424 447 +23 ☔ View full report in Codecov by Sentry. |
Added a raise NotImplementedError for any other harmonic mean methods that is neither "scipy" nor "numba".
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.
LGTM. Some inline questions, sugggestions.
Co-authored-by: carlosgjs <[email protected]>
for more information, see https://pre-commit.ci
Added '_sv_harmon_mean' numba implementation for
calculating harmonic mean that uses calculations
used within the original fortran code to get same
harmonic values. Now there's a 'method' value for the main 'sv_harmonic_mean' function that allows user
to switch back and forth b/w the two methods.
Ref #193