Fix deprecated np.maximum calls with 3 params

This commit is contained in:
2026-04-28 11:38:31 +03:00
parent 94402c7267
commit 0e9b20caa2
+2 -2
View File
@@ -85,7 +85,7 @@ class RadiativeCorrection(SpectrumComponent):
# Energy difference # Energy difference
delta_W = self.W0 - W delta_W = self.W0 - W
delta_W = np.maximum(delta_W > 0, delta_W, np.full_like(delta_W, 1e-12)) delta_W = np.where(delta_W > 0, delta_W, 1e-12)
# Second line Eq. (50) # Second line Eq. (50)
term2 = 4.0 * atanh_factor * (delta_W / (3.0 * W) - 1.5 + np.log(2.0 * delta_W)) term2 = 4.0 * atanh_factor * (delta_W / (3.0 * W) - 1.5 + np.log(2.0 * delta_W))
@@ -124,7 +124,7 @@ class RadiativeCorrection(SpectrumComponent):
# Energy difference # Energy difference
delta_W = self.W0 - W delta_W = self.W0 - W
delta_W = np.maximum(delta_W > 0, delta_W, np.full_like(delta_W, 1e-12)) delta_W = np.where(delta_W > 0, delta_W, 1e-12)
# Apply resummation from Eq. (53) # Apply resummation from Eq. (53)
# Replace divergent ln(W0 - W) term with (W0 - W)^t(beta) - 1 # Replace divergent ln(W0 - W) term with (W0 - W)^t(beta) - 1