Skip to content

Array copy behaviour #3751

@DPeterK

Description

@DPeterK

The following behaviour when copying a dask array created using from_array and then computing the result isn't what I'd expect:

import dask.array as da
import numpy as np

d = da.from_array(np.array([0, 1]), chunks=2,)
dc = d.copy()

d is dc
False
d.compute() is dc.compute()
True

A dask array not created using from_array does not show this behaviour:

d1 = da.ones(10, chunks=2,)

d1c = d1.copy()
d1 is d1c
False
d1.compute() is d1c.compute()
False

For reference, this behaviour seems to be tripping up an Iris test, resulting in this test failure.

I'm using Python 3.6.5 and dask 0.18.1 (this behaviour doesn't appear in v0.18.0).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions