Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix test failing due to Numpy 2.0 promotion rules
From Numpy 2.0 adding a numpy.float32 and a Python numeric type returns a numy.float32 when it previously returned a numpy.float64. This changes the behavior when using the Python builtin sum function on a numpy.float32 array as the internal computations now will be performed as numpy.float32 additions when it used to be numpy.float64. Changing these lines to calling .sum() on the arrays behaves the same way as before (doing the internal calculations as float64 and downcasting the result to a float32).
- Loading branch information