Skip to content

How should xarray use/support sparse arrays? #3213

Open
@shoyer

Description

@shoyer

I'm looking forward to being easily able to create sparse xarray objects from pandas: #3206

Are there other xarray APIs that could make good use of sparse arrays, or could make sparse arrays easier to use?

Some ideas:

  • to_sparse()/to_dense() methods for converting to/from sparse without requiring using .data
  • to_dataframe()/to_series() could grow options for skipping the fill-value in sparse arrays, so they can round-trip MultiIndex data back to pandas
  • Serialization to/from netCDF files, using some custom convention (see Sparse arrays #1375 (comment))

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-arraysrelated to flexible array support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions