coecms / xmhw

Xarray version of Marine Heatwaves code by Eric Olivier
https://xmhw.readthedocs.io/en/latest/
Apache License 2.0
21 stars 10 forks source link

call of dask.compute() #63

Closed florianboergel closed 1 year ago

florianboergel commented 1 year ago

I have one question regarding the dask.compute calls. In the documentation and the examples, they say that a list with delayed objects needs to be called with *. Are you aware of the difference? I am just curious because I don't know :-D

Hence something like

results = dask.compute(climls)

could (or should?) be

results = dask.compute(*climls)

I will test myself if this throws errors, but I feel the dask documentation is rather short and incomplete.

Flo

paolap commented 1 year ago

I didn't notice that when I implemented it, but the * should unpack the list, I think it works anyway as climls is a simple list. If it was necessary in this situation you would get results only for the first grid cell, or an error and neither happens.