You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inline and optimize ContourLabeler.get_label_coords.
`get_label_coords` is clearly an internal helper to `locate_label`; e.g.
the `distances` parameter needs to be filled in with a very specific
array that's internally computed by `locate_label`. Inline it, which
also makes clearer the possibility to save some further computation for
`locate_label` to return a linearized index (the part that was commented
"There must be a more efficient way..."; indeed converting the array to
a list of tuples to get back the index seems pretty inefficient).
Also better document the implementation of `get_label_coords` (I'm not
actually changing any of the code logic).
0 commit comments