Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Deprecate Path helpers in bezier.py#14199
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
931adba
to16b56dd
CompareUh oh!
There was an error while loading.Please reload this page.
timhoffm commentedMay 18, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This sounds like a dangerous change of semantics when using the proposed alternatives. |
The thing with STOP would be a separate PR anyways, I'm just noting it here because I realized its nonobvious semantics in this PR. |
This needs a rebase and it is not immediately clear that not calling |
rebased |
f4dafd9
to800fedc
Comparebrunobeltran commentedMar 18, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
A couple thoughts
Had I been more confident that rocking the waters with my own opinions on naming was okay, I would have proposed renaming My opinion is that the proposed replacement ( |
I clarified the deprecation note for make_path_regular to note that one may want to remove the final STOP. |
Fair, I should have phrased this better. What I meant was something like, "as long as you guys agree that losing this functionality would hurt the users by taking away some use case I haven't thought of". None of the use cases I was thinking of involve less than one stroke, it makes sense to |
brunobeltran commentedMar 18, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
In related news, since you've also noticed this last_vert,last_code=vertices[-1],codes[-1]vertices=vertices[codes!=self.STOP]codes=codes[codes!=self.STOP]iflast_code==self.STOP:vertices=np.append(vertices,last_vert)codes=np.append(codes,last_code) to prevent internal |
I think we should just deprecate STOPs, unless there's a good reason to keep them (which I can't think of...). |
brunobeltran commentedMar 18, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I agree that STOP should be deprecated....but that seems out of scope of this PR, and until such day as it's actually done, it seems like |
Do you want to PR that? |
Sure! |
... in favor of the corresponding ones in path.py.(Strictly speaking, `make_path_regular` is closed to`cleaned(remove_nans=False)` but in practice `cleaned()` works equallywell.)
Uh oh!
There was an error while loading.Please reload this page.
... in favor of the corresponding ones in path.py.
(Strictly speaking,
make_path_regular
is closer tocleaned(remove_nans=False)
but in practicecleaned()
works equallywell.)
Note that we may want to deprecate the STOP code, which is documented as "not required and ignored" but actually causes the rest of the path to be dropped silently; it gets appended by
cleaned()
and caused an earlier version of this PR to break (because the STOP would then cause the rest of the concatenated path to be dropped).PR Summary
PR Checklist