Skip to content

Array.reindex silently ignores new_axis argument when first argument is an Axis #1121

Open
@gdementen

Description

@gdementen

While looking at the code of reindex for #1120 , I noticed the following bug:

>>> arr = ndtest(3)
>>> arr.reindex("a", "a1,a2,a3")
a   a1   a2   a3
   1.0  2.0  nan
>>> arr.reindex(arr.a, "a1,a2,a3")
a   a0   a1   a2
   0.0  1.0  2.0

Very high priority because this is a silent failure. I think fixing this should only be a matter of adding "and new_axis is None".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions