Skip to content

deprecate Axis(pd.Index()) #1182

Description

@gdementen

in _to_ticks we have:

if isinstance(s, pd.Index):

which is not used internally but is useful if one wants to create an Axis from a pandas Index manually.

I don't think this should be allowed directly in la.Axis (we accept too many things in there) and would rather have a dedicated class method for that. Unsure even that is worth it.

In any case, this code path has no test coverage, so if we decide to continue supporting it as-is, it needs a test.

Activity

  1. changed the title [-]deprecate Axis(pd.Index()) possibly moving that to Axis.from_index()[/-] [+]deprecate Axis(pd.Index()) maybe moving that to Axis.from_index()[/+] on Mar 31, 2026
  2. changed the title [-]deprecate Axis(pd.Index()) maybe moving that to Axis.from_index()[/-] [+]deprecate Axis(pd.Index())[/+] on Apr 3, 2026
  3. added this to the 0.36 milestone on Apr 3, 2026
  4. gdementen commented on Apr 3, 2026

    @gdementen
    ContributorAuthor

    I think we should just deprecate it and if someone complains, move the functionality to Axis.from_index()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions