bluesky / databroker

Unified API pulling data from multiple sources
https://blueskyproject.io/databroker
BSD 3-Clause "New" or "Revised" License
35 stars 47 forks source link

Numpy 2 fix #815

Closed danielballan closed 5 months ago

danielballan commented 5 months ago

We saw a failure on numpy 2.0 due to an untested codepath in the case of nonscalar data placed directly in an Event document.

New unit test exercises the bug:

FAILED databroker/tests/test_broker.py::test_direct_img_read[mongo-tiled-False] - AttributeError: module 'numpy' has no attribute 'product'
FAILED databroker/tests/test_broker.py::test_direct_img_read[mongo-tiled-True] - AttributeError: module 'numpy' has no attribute 
'product'