Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[MNT]: Remove axis parameter from scales #29349

Open
@timhoffm

Description

@timhoffm

Summary

For historic reasons, Scales take the axis as the first parameter. It's use is discouraged and none of our own scales actually use it at least since #12831.

To simplify our code, we should get rid of that parameter.

Proposed fix

Do we know whether

  • downstream libraries add their own Scales via register_scale()?
  • user will directly instantiate our own Scale classes?

If so we need the full deprecation machinery:

  1. Make scale_factory work with scales have or have not an initial axis parameter. Either by try-except with/without this parameter or by introspecting the signature.
  2. Introspect scale classes passed to register_scale and warn if they still have the axis argument.
  3. Make all our scales work with/without the axis parameter by adding a suitable decorator to their init functions.

Otherwise, we can simplify the transition.

--

Edit: Both questions are yes, so we need the full deprecation mechanism.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions