def toarray(v, index_value=False):
    if dask and isinstance(v, dask.array.Array):
        arr =  v.compute()
        return arr[()] if index_value else arr
    else:
        return v
Interface helper function to turn dask Arrays into numpy arrays as
dataset/ETHPy150Open ioam/holoviews/holoviews/element/util.py/toarray