-
Notifications
You must be signed in to change notification settings - Fork 325
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
passing-input-with-finite-value to core._mass
is being violated
#1011
Comments
What exactly are you proposing? To set |
Right! I am now thinking what if we just avoid setting fastmath here for core._mass because this function does not do any arithmetic operations. I can try it out and check its impact on performance if there is any. |
In the following,
I removed the I then compared the performance of
I ran the following script:
And I ran it for several times.
where |
I see. When there is no speed gain, I would rather be explicit rather than implicit. In this case, it appears that the inputs/outputs can all contain non-finite values. This means that I think this should be handled together with #708 though |
That's a good idea! Got it!!
Okay. So, the plan is to first solve #708 (and this issue, i.e. #1011), and then resume the work on #1012 as suggested in #1012 (comment). |
Yes, thank you @NimaSarajpoor! |
The function
core.mass(Q, T, ...)
callscore.preprocess(T, m, ...)
, which return the following values:We then pass these values to
core._mass
. However, theseM_T
andΣ_T
can contain non-finite value if the originalT
has non-finite value. In fact, if you just follow the functioncore._mass
and go the callee function and then continue till you reach the very end of the road, you can see that at the end, we use that in the functioncore._calculate_squared_distance
to determine whether a distance should be infinite or not.stumpy/stumpy/core.py
Lines 1093 to 1094 in 3077d0d
In the function
core._calculate_squared_distance
, the flag is correctly set. Was wondering if should do the same forcore._mass
?The text was updated successfully, but these errors were encountered: