-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Deprecate redundant log-scale transform classes. #12832
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
Looks like this barely changed a few images, but overall 👍 on the change. Surprising these aren't used anywhere.... |
The tiny change in baseline images appears to come from floating point errors between |
with np.errstate(divide="ignore", invalid="ignore"): | ||
log = {np.e: np.log, 2: np.log2, 10: np.log10}.get(self.base) | ||
if log: # If possible, do everything in a single call to Numpy. | ||
out = log(a) |
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.
Is this the optimization you are referring to? I guess I think this is a good idea since it covers 99.9% of the cases, and would instead suggest changing the images or increasing the tolerance. But I'm not an expert on how expensive the un-optimized code is...
060b128
to
8747e87
Compare
Decided to just bump the tolerances, which were already set to 0.02 on some architectures anyways. |
467f536
to
7a90d25
Compare
7a90d25
to
2df7888
Compare
rebased |
2df7888
to
d19fd81
Compare
…832-on-v3.1.x Backport PR #12832 on branch v3.1.x (Deprecate redundant log-scale transform classes.)
PR Summary
Having a bunch of separate log Transform classes is mentioned as an optimization, but that optimization wasn't even there anymore. Restore it, while keeping everything in a single log Transform class.
PR Checklist