scikit-hep / iminuit

Jupyter-friendly Python interface for C++ MINUIT2
https://scikit-hep.org/iminuit
Other
283 stars 76 forks source link

Fix use of removed array rules in test #952

Closed HDembinski closed 9 months ago

HDembinski commented 9 months ago

This fixes the failing test and two performance warnings raised in the tests. Like @henryiii suggested, these changes were needed in one particular test which relied on broadcasting rules (in this case they were narrowing rules) that have been removed from numpy.

Previously, it was possible to do this

a = np.zeroes(2)
b = np.ones(1)
a[0] += b # add sequence of length 1 to scalar