Skip to content

Conversation

@davidhassell
Copy link
Collaborator

@davidhassell davidhassell commented Apr 20, 2022

The (undocumented) API seems to be to_dask_array(), e.g. (from dask.array.asarray) https://github.com/dask/dask/blob/main/dask/array/core.py#L4343

Need to think about when to merge this, as it could break other items ...

Copy link
Member

@sadielbartholomew sadielbartholomew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good except that three cases of (_)get_dask seem to remain (as indicated by one test failure in test_Data_reshape), though I suspect they were re-introduced by the latest merge commit rather than missed by you when you did this. Once you blitz those then I am happy for this to be merged:

$ pwd
/home/sadie/cf-python/cf
$ git grep "get_dask"
data/data.py:    #        return self.get_dask(copy=True)
data/data.py:        dx = self._get_dask()
data/data.py:        dx = d._get_dask()
data/utils.py:        return a.data.get_dask(copy=False)

As indicated in our discussion last week, I agree with the API-related decision to standardise to use get_dask_array and not have those extra methods, where the loss of get, set, del symmetry in this case is justified.

@davidhassell
Copy link
Collaborator Author

Thanks, Sadie. Superceded _get_dask occurrences removed. Merging.

@davidhassell davidhassell merged commit 1958217 into NCAS-CMS:lama-to-dask Apr 25, 2022
@davidhassell davidhassell deleted the dask-to-dask-array branch November 15, 2022 09:20
@davidhassell davidhassell added this to the 3.14.0 milestone Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dask Relating to the use of Dask

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants