Skip to content

Commit

Permalink
dask _does_ have some load-all-into-memory operations. However, this …
Browse files Browse the repository at this point in the history
…simply Does Not Work when I try it. Why?
  • Loading branch information
keflavich committed Jan 5, 2025
1 parent 7d7de2b commit 5ce4924
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spectral_cube/dask_spectral_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,15 @@ def _data(self, value):
raise TypeError('_data should be set to a dask array')
self.__data = value

def _warn_slow(self):
"""
Dask has a different 'slow' warning than non-dask.
"""
warnings.warn("""
Dask requires loading the whole cube into memory for median, percentile, and mad
calculations. This may result in slow computation.
""", PossiblySlowWarning)

def use_dask_scheduler(self, scheduler, num_workers=None):
"""
Set the dask scheduler to use.
Expand Down

0 comments on commit 5ce4924

Please sign in to comment.