Skip to content

support for reindex #1147

@Beforerr

Description

@Beforerr

I am wondering if we would like something like what xarray.reindex does https://docs.xarray.dev/en/stable/generated/xarray.DataArray.reindex.html.

I have working codes that support something like this, but I am not sure if I should make a PR.

The interface is something like this below

using DimensionalData, Dates

times = DateTime(2020, 1, 1):Day(1):DateTime(2020, 1, 10)
da = DimArray(1:10, Ti(times))

# Reindex to new times
new_times = DateTime(2020, 1, 1, 12):Day(1):DateTime(2020, 1, 10, 12)
reindex(da, Ti(new_times); method=:bfill)

One thing is that Base has reindex method for handling subarray.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions