-
Notifications
You must be signed in to change notification settings - Fork 17
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
Move some functions to different modules #175
Conversation
Codecov Report
@@ Coverage Diff @@
## main #175 +/- ##
=======================================
Coverage 92.20% 92.21%
=======================================
Files 48 48
Lines 3350 3352 +2
=======================================
+ Hits 3089 3091 +2
Misses 261 261
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Agreed on Suggestion: remove |
I see some value in keeping it, if only as a record of the efficient way to implement the one line. As alternative names, perhaps |
I tend to share @Michael-T-McCann's sentiment and would suggest removing Unless this can be solved more generally and with a wrapper replacing function values in some region? Something like # a/b but 0.0 where b==0
c = special_case((__div__, a, b), b==0, 0.0) |
I'm still unconvinced on removing |
The The problem that it solves is differentiating something like so i think this function is helpful, but discoverability is an issue. if i was a new user and i wanted to code up a sinc function, would i know to use |
Executive summary: I think
Something I did not realize until reading the linked comment. This is not a matter of, e.g., It is a nasty jax sharp edge. Unfortunately I don't think this function can save people from the sharp edge, but it's useful for people who already know about the sharp edge. |
Moved some functions from
scico.util
andscico.math
to new modulescico.array
.It's not clear whether it's worth keeping
scico.math
; functionsafe_divide
could be moved toscico.array
, andrel_res
would perhaps make sense inscico.metric
.