In some circumstances, dask.compute() can still return a dask array (rather than the desired numpy array). I was able to trigger this with an external data loader library that presumably falls foul of this bug. Explicit to np.array fixes this for my use case and seems otherwise totally innocuous.
I am not providing a new unit test because I'm not sure how to reliably reproduce the extra-lazy dask array outside of the specific data loading library I was using.
Pull Request Template
Description
In some circumstances, dask.compute() can still return a dask array (rather than the desired numpy array). I was able to trigger this with an external data loader library that presumably falls foul of this bug. Explicit to np.array fixes this for my use case and seems otherwise totally innocuous.
I am not providing a new unit test because I'm not sure how to reliably reproduce the extra-lazy dask array outside of the specific data loading library I was using.
Fixes #2397