Skip to content

BUG: .copy() converts MultiIndex into an base Index #769

@shoyer

Description

@shoyer

Using the example from #767:

In [15]: da.indexes
Out[15]:
band_wavenumber: MultiIndex(levels=[['bar', 'foo'], [4050.2, 4050.3, 4100.1, 4100.3, 4100.5]],
                            labels=[[1, 1, 0, 0, 0], [0, 1, 2, 3, 4]],
                            names=['band', 'wavenumber'])

In [16]: da.copy().indexes
Out[16]:
band_wavenumber: Index([('foo', 4050.2), ('foo', 4050.3), ('bar', 4100.1), ('bar', 4100.3),
                        ('bar', 4100.5)],
                       dtype='object', name='band_wavenumber')

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions