Skip to content

ffill does not spread chunks when used with dask.array #6997

Closed
@eserie

Description

@eserie

What is your issue?

When using xarray with dask.array as in the following example:

import numpy as np
import xarray as xr
import dask
ds_ = xr.Dataset()
ds_["test"] = ("dim_0",), dask.array.from_array(
    [0, 1, np.nan, np.nan, np.nan], chunks=2
)

then the ffill method does not seem to propagate through the underlying chunks used by dask.array.
In the example above, this means that

 ds_.ffill("dim_0").compute().test.values

gives

>>> array([ 0., 1., 1., 1., nan])

where

ds_.compute().ffill("dim_0").test.values

gives

>>> array([0., 1., 1., 1., 1., 1.])

Is it an expected behavior ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    plan to closeMay be closeable, needs more eyeballs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions