Skip to content

mixed type Axis cannot translate arrays of labels #1194

@gdementen

Description

@gdementen

This edge-case is actually more important than it looks because we produce such array keys in some places, including reindex. Which means that an array with an Axis with mixed-type labels cannot be "cleaned up" using reindex, which seems like a sensible thing to do (set_labels does work though).

>>> a = Axis(np.array(['a0', 1], dtype=object), 'a')
>>> a.index(['a0'])
[0]
>>> a.index(np.array(['a0']))
TypeError: '<' not supported between instances of 'int' and 'str'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions