-
Notifications
You must be signed in to change notification settings - Fork 833
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
_bearings_distribution: bin_centers terminology #1149
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## v2 #1149 +/- ##
=======================================
Coverage 97.98% 97.98%
=======================================
Files 24 24
Lines 2436 2436
=======================================
Hits 2387 2387
Misses 49 49 ☔ View full report in Codecov by Sentry. |
@dhimmel help me understand what's going on here. Aside from the renaming changes, I see a couple numerical and indexing changes. What's the goal and what are they doing? |
Currently, The non-renaming changes are entirely related to removing the final repetitive value from the bin centers array. When giving the center of each bin, there is not much rationale for repeating the first bin at the end of the list. The repeated final value was a relic of When returning |
osmnx/plot.py
Outdated
# positions: where to center each bar. ignore the last bin edge, because | ||
# it's the same as the first (i.e., 0 degrees = 360 degrees) |
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.
It looks like this comment should be updated then.
osmnx/plot.py
Outdated
@@ -749,7 +749,7 @@ def plot_orientation( # noqa: PLR0913 | |||
} | |||
|
|||
# get the bearings' distribution's bin counts and edges |
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.
Another reference to edges here.
f21ad2f
to
9e58161
Compare
9e58161
to
4139a04
Compare
Given the elegant but potentially confusing implementation of |
This PR addresses terminology in internal-use functions for greater clarity:
bin_counts
andbin_centers
now have the same length, which is best for most use cases