Skip to content

Lazy cube copy behaviour #3087

@DPeterK

Description

@DPeterK

Copying a cube with lazy data currently isn't behaving as expected:

from iris.cube import Cube
from iris._lazy_data import as_lazy_data
import numpy as np

c = Cube(as_lazy_data(np.array([0, 1]), chunks=2,))
cc = c.copy()
c is cc
False
c.data is cc.data
True

There's current a failing test on Travis because of this behaviour (it's this test that's failing).

I think we're inheriting this behaviour from dask 0.18.1, so a quick workaround for this is to pin dask to v0.18.0, which doesn't evidence this behaviour.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions