-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
[issue-307] add 2 extra (on left and right) dots out of zommed box #308
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #308 +/- ##
==========================================
- Coverage 96.49% 95.97% -0.52%
==========================================
Files 14 14
Lines 1141 1143 +2
==========================================
- Hits 1101 1097 -4
- Misses 40 46 +6 ☔ View full report in Codecov by Sentry. |
@@ -85,6 +85,8 @@ def get_start_end_indices(hf_trace_data, axis_type, start, end) -> Tuple[int, in | |||
# Search the index-positions | |||
start_idx = bisect.bisect_left(hf_trace_data["x"], start) | |||
end_idx = bisect.bisect_right(hf_trace_data["x"], end) | |||
start_idx = max(0, start_idx - 1) |
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.
We should certainly add some documentation / issue reference to which this is performed.
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.
added to CHANGELOG.md. Do I need to mention it anywhere else?
@@ -296,7 +296,7 @@ def test_log_axis(): | |||
assert len(out) == 2 | |||
assert (x1 - x0) < 10 | |||
assert len(out[1]["x"]) == 1000 | |||
assert out[-1]["x"][0] >= 100 | |||
assert out[-1]["x"][0] >= 99 |
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.
So here, you increase (i.e. lower) the left boundary, because (when possible) a datapoint to the left is added. Why is there no need to increase the right boundary?
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.
(maybe because of a small rounding error with log?)
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.
You are right!
-> end_idx = bisect.bisect_right(hf_trace_data["x"], end)
-> end == 49999.99999999999
Nevertheless alter boundary. It would benefit readability
Hello guys :] Can we get this baby merged? It would help me tremendously |
No description provided.