glue-viz / glue

Linked Data Visualizations Across Multiple Files
http://glueviz.org
Other
721 stars 152 forks source link

Make sure __getitem__ always returns a numpy array #2399

Closed jfoster17 closed 1 year ago

jfoster17 commented 1 year ago

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