Closed aaronspring closed 2 years ago
When installing xhistogram via pip many packages (bokeh etc) are installed due to the dask dependency. https://github.com/xgcm/xhistogram/network/dependencies
xhistogram
pip
dask
However, we actually only/mostly use dask.array. Could we make dask.array the dependency, not dask? I am unsure whether this makes the difference I want to see
dask.array
dask.is_dask_collection is used in https://github.com/xgcm/xhistogram/blob/5c12e178cfeefa1c36c2b9ea45fe2101f35c9bd2/xhistogram/core.py#L339, but this could be replaced as in https://github.com/xgcm/xhistogram/blob/5c12e178cfeefa1c36c2b9ea45fe2101f35c9bd2/xhistogram/core.py#L34 by isinstance(a, dsa.core.Array)
dask.is_dask_collection
isinstance(a, dsa.core.Array)
x-ref to https://github.com/xarray-contrib/xskillscore/issues/359
Thanks for the suggestion Aaron! PR for these changes would be most welcome.
When installing
xhistogram
viapip
many packages (bokeh etc) are installed due to thedask
dependency. https://github.com/xgcm/xhistogram/network/dependenciesHowever, we actually only/mostly use
dask.array
. Could we makedask.array
the dependency, notdask
? I am unsure whether this makes the difference I want to seedask.is_dask_collection
is used in https://github.com/xgcm/xhistogram/blob/5c12e178cfeefa1c36c2b9ea45fe2101f35c9bd2/xhistogram/core.py#L339, but this could be replaced as in https://github.com/xgcm/xhistogram/blob/5c12e178cfeefa1c36c2b9ea45fe2101f35c9bd2/xhistogram/core.py#L34 byisinstance(a, dsa.core.Array)
x-ref to https://github.com/xarray-contrib/xskillscore/issues/359