Bug#1109954: iminuit: tests fail with scipy 1.16
Drew Parsons
dparsons at debian.org
Sun Jul 27 09:29:40 BST 2025
Source: iminuit
Version: 2.30.1-3
Severity: normal
scipy 1.16 has been uploaded to experimental.
iminuit tests are failing with it:
5379s FAILED tests/test_cost.py::test_BinnedNLL_2D_with_zero_bins - AssertionError:...
5379s FAILED tests/test_cost.py::test_ExtendedBinnedNLL_3D - AssertionError: assert...
5379s ============ 2 failed, 597 passed, 73 skipped in 5320.20s (1:28:40) ============
5379s =================================== FAILURES ===================================
5379s _______________________ test_BinnedNLL_2D_with_zero_bins _______________________
5379s
5379s def test_BinnedNLL_2D_with_zero_bins():
5379s truth = (0.1, 0.2, 0.3, 0.4, 0.5)
5379s x, y = mvnorm(*truth).rvs(size=1000, random_state=1).T
5379s
5379s w, xe, ye = np.histogram2d(x, y, bins=(50, 100), range=((-5, 5), (-5, 5)))
5379s assert np.mean(w == 0) > 0.25
5379s
5379s def model(xy, mux, muy, sx, sy, rho):
5379s return mvnorm(mux, muy, sx, sy, rho).cdf(xy.T)
5379s
5379s cost = BinnedNLL(w, (xe, ye), model)
5379s m = Minuit(cost, *truth)
5379s m.limits["sx", "sy"] = (0, None)
5379s m.limits["rho"] = (-1, 1)
5379s m.migrad()
5379s > assert m.valid
5379s E AssertionError: assert False
5379s E + where False = <FMin algorithm='Migrad' edm=276.66259465991817 edm_goal=0.0002 errordef=1.0 fval=186.5963009867324 has_accurate_covar...8e-09 1.20484363e-07\n 2.59093896e-09]\n [1.73161882e-09 2.50344924e-10 3.00138667e-11 2.59093896e-09\n 2.24594883e-10]].valid
5379s
5379s tests/test_cost.py:800: AssertionError
5379s __________________________ test_ExtendedBinnedNLL_3D ___________________________
5379s
5379s def test_ExtendedBinnedNLL_3D():
5379s norm = pytest.importorskip("scipy.stats").norm
5379s
5379s truth = (1.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7)
5379s n = int(truth[0] * 10000)
5379s x, y = mvnorm(*truth[1:-2]).rvs(size=n).T
5379s z = norm(truth[-2], truth[-1]).rvs(size=n)
5379s
5379s w, edges = np.histogramdd((x, y, z), bins=(5, 10, 20))
5379s
5379s def model(xyz, n, mux, muy, sx, sy, rho, muz, sz):
5379s *xy, z = xyz
5379s return (
5379s n
5379s * 10000
5379s * mvnorm(mux, muy, sx, sy, rho).cdf(np.transpose(xy))
5379s * norm(muz, sz).cdf(z)
5379s )
5379s
5379s cost = ExtendedBinnedNLL(w, edges, model)
5379s assert cost.ndata == np.prod(w.shape)
5379s m = Minuit(cost, *truth)
5379s m.limits["n", "sx", "sy", "sz"] = (0, None)
5379s m.limits["rho"] = (-1, 1)
5379s m.migrad()
5379s > assert m.valid
5379s E AssertionError: assert False
5379s E + where False = <FMin algorithm='Migrad' edm=2538331943.5794806 edm_goal=0.0002 errordef=1.0 fval=580.5086049920924 has_accurate_covar...-24 -1.16450242e-14 1.25482265e-22 1.20461698e-23\n -5.25016881e-24 4.98818833e-23 3.05998480e-23 9.73234618e-24]].valid
5379s
5379s tests/test_cost.py:1082: AssertionError
This bug will become RC serious later, after scipy 1.16 is uploaded to
unstable.
-- System Information:
Debian Release: 13.0
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.12.38+deb13-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
More information about the debian-science-maintainers
mailing list