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
Fix mass absolute nan #288
Conversation
@DanBenHa Thank you for the PR! I couldn't find much information on when negative values may occur except for one article that simply set those values to zero before taking the square root. I am wondering if there are situations where setting the negative values to zero is wrong? Otherwise, everything else looks good and this should be ready to merge. |
Good question. I don't know. But that would imply calculating a complex value for the distance of two real-valued vectors. Would that make sense? |
Codecov Report
@@ Coverage Diff @@
## master #288 +/- ##
=======================================
Coverage 99.82% 99.82%
=======================================
Files 19 19
Lines 1732 1734 +2
=======================================
+ Hits 1729 1731 +2
Misses 3 3
Continue to review full report at Codecov.
|
Since negative values imply some sort of deficiency in the numerical precision, I think what I'm really asking is if there might be situations where the amplitude of the negative value may be indicative of something that is a lot worst (while a small, near zero amplitude is due to numerical precision). Just thinking out loud here though :) |
I see. I guess it could be indicative of problems in the computation of |
Okay, I spent most of my morning looking for an ideal solution and, while there were many discussions, there were no obvious solutions |
Haha, reminds me of some of my mornings ;) Thanks for merging and the interesting question raised. |
Fixes #286
Pull Request Checklist
Below is a simple checklist but please do not hesitate to ask for assistance!
black
(i.e.,python -m pip install black
orconda install -c conda-forge black
)flake8
(i.e.,python -m pip install flake8
orconda install -c conda-forge flake8
)pytest-cov
(i.e.,python -m pip install pytest-cov
orconda install -c conda-forge pytest-cov
)black .
in the root stumpy directoryflake8 .
in the root stumpy directory./setup.sh && ./test.sh
in the root stumpy directory