Error with numpy 2
Hi, your friendly Debian package maintainer here. As part of the transition to numpy2 in Debian, we've noticed that pyusid fails to run its testsuite due to a "RecursionError: maximum recursion depth exceeded" exception.
It appears that the __eq__() method of the Dimension class calls np.allclose(self, other). The problem is that np.allclose() does a few tests and falls back to testing whether x == y (see numpy/_core/numeric.py on line 2449), which in turns… calls the Dimension.__eq__() method, and so on until the overflow.
I'm looking for a way to fix that, but if someone better versed in the code beats me to it, it'll probably be even better :-)
It may be necessary to check the dimension attributes one by one, and then the arrays separately, in order to fix this. I have also found some np.product() calls that were causing trouble, and have gone ahead and removed them. The changes have been pushed to a new branch, and it should be compatible now, but these tests will have to be reworked.
The tests now pass for me and the Debian package with your patch, so thanks a lot :-)