-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Deprecate apply_theta_transforms=True to PolarTransform #24834
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
Conversation
6d7d585
to
9bed666
Compare
InvertedPolarTransform also needs this? |
Pushing to 3.8 as I do not think this is critical to get in and is still draft. Please push back if I am incorrect @dstansby . |
b1c7cf4
to
deeb925
Compare
deeb925
to
b91198f
Compare
b91198f
to
b19f15e
Compare
We talked about this on the call this week and we felt we did not have enough context to understand why we want to do this and concern about exposing an underscored arg name to the users. There was also surprise about the claim that this was not tested given it is the default! Do we want to make this public if we are going to document it like this? Should we just have a second class? |
I guess the point is that a polar axes sets this to False, which is our internal use. So this would only affect power users who are using PolarTransform directly? OTOH, it seems we should have a public toggle for this, and document it? |
I think the original intention was to keep the 'version' of the class where no theta transform was applied private, but for backwards API compatability keep a version where a theta transform was applied. So I think making the argument public and going through a deprecation as is in this PR might be a reasonable way forward? The motivation for this was to make |
bfce982
to
7f0847c
Compare
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.
I think this is OK since this is probably only used by developers, if anyone. Maybe not the nicest dance, but improves maintainability.
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 needs a rebase now.
To silence this warning and adopt future behaviour, | ||
set ``apply_theta_transforms=False``. If you need to retain the behaviour | ||
where theta values are transformed, chain the ``PolarTransform`` with | ||
another transform that performs the theta shift and/or sign shift. |
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 add an example of which transform to use?
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 a note that an Affine2D
can be used to do this.
7f0847c
to
c1b80c5
Compare
c77a03c
to
ee48fb3
Compare
PR Summary
This parameter was introduced in #4699 for backwards compatabilty reasons, when shifting theta values was refactored out of
PolarTransform
.PolarTransform
to do a theta shift first_apply_theta_transforms = True
So I think it's worth deprecating and eventually removing this.
PR Checklist
Documentation and Tests
pytest
passes)Release Notes
.. versionadded::
directive in the docstring and documented indoc/users/next_whats_new/
.. versionchanged::
directive in the docstring and documented indoc/api/next_api_changes/
next_whats_new/README.rst
ornext_api_changes/README.rst