random_views_for_dask_array

glue.utils.array.random_views_for_dask_array(array, n_random_samples, n_chunks)[source]

Return a list of views to extract random values from a dask array in an efficient way taking into account the chunk layout. This will return n_chunks views such that all views together add up to approximately n_random_samples samples.