Fix blackbody code to work with dask arrays
djhoese opened this issue · 1 comments
djhoese commented
There are a lot of functions in pyspectral.blackbody
that call np.array(some_input_argument)
which can unnecessarily convert dask arrays to numpy arrays. I/we should update this so it allows for dask arrays to pass through. One option:
try:
from dask.array import asanyarray
except ImportError:
from numpy import asanyarray
Thoughts?
djhoese commented
Oops this is not right. This will convert things to a dask array if they aren't already. I'll find another solution.