-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Patch IndexError associated with heatmaps. #6438
base: main
Are you sure you want to change the base?
Patch IndexError associated with heatmaps. #6438
Conversation
I use this library to create a heatmap that lets me retrieve data on click. Unfortunately, I encountered an index error that caused the session to break when the x value was out of bounds. This patch makes the clicking outside of bounds a non-issue. It is just a small patch but for my applications it works great.
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.
This code implements a patch to prevent IndexErrors that occur when clicking on heat map areas outside of the defined bounds.
Likely also needed for Can you share a minimal, reproducible example (MRE)? |
To reproduce my error, you'll need a test .nc dataset file, which I can provide. These files are approximately 100 MB, and I'm not sure how or where to send them. After obtaining the file, you'll need to open it using SoundScope and run the main script from this repository: SoundScope GitHub. It may take me some time to isolate this issue from the application for a minimal example. Please let me know how you’d like to proceed. |
I think it should be possible to reduce the files to synthetic data. |
Regarding y, I haven't encountered that issue myself, but it might be worth exploring. You can reproduce the problem in another application by clicking the color bar on the heatmap legend and checking the logs. The x value will consistently be out of bounds. While this may not cause widespread issues, it does affect a specific data loading system I've implemented, resulting in improper loading of records associated with each cell. To observe this, click the color bar in the legend when an on-click watcher is set up like this:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6438 +/- ##
==========================================
- Coverage 88.50% 88.49% -0.01%
==========================================
Files 323 323
Lines 68627 68630 +3
==========================================
Hits 60737 60737
- Misses 7890 7893 +3 ☔ View full report in Codecov by Sentry. |
Ill see what I can do. |
I use this library to create a heatmaps on my acoustics application which lets me retrieve data on click. Unfortunately, I encountered an index error that caused the session to break when the x value was out of bounds. This patch makes the clicking outside of bounds a non-issue. It is just a small patch but for my applications it works great. I am just passing the fix along to you. Please feel free to do with it what you will.