scikit-hep / boost-histogram

Python bindings for the C++14 Boost::Histogram library
https://boost-histogram.readthedocs.io
BSD 3-Clause "New" or "Revised" License
143 stars 22 forks source link

chore: try running tests with numpy 2 #944

Closed lgray closed 4 months ago

lgray commented 4 months ago

I want to see if tests fail with the recently released numpy 2.

Related to #943

lgray commented 4 months ago

@henryiii can you please let these tests run so we can see what fails in numpy2?

henryiii commented 4 months ago

numpy>=2.0.0b1 is already present in the tests, so pretty sure this does work.

lgray commented 4 months ago

I do not understand how the tests are passing: https://github.com/scikit-hep/boost-histogram/blob/develop/tests/test_axis.py#L696-L700

Requires everything to be as expected, but:

>>> bh.axis.Integer(1, 3).edges
array([3., 3., 3.])

Something is rather fishy.

lgray commented 4 months ago

Likewise:

>>> a = bh.axis.Integer(-1, 3)
>>> a
Integer(3, 3)
>>> a == (-1,0,1,2)
False