Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-iminuit for openSUSE:Factory 
checked in at 2023-05-05 15:58:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-iminuit (Old)
 and      /work/SRC/openSUSE:Factory/.python-iminuit.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-iminuit"

Fri May  5 15:58:04 2023 rev:26 rq:1084804 version:2.21.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-iminuit/python-iminuit.changes    
2023-03-27 18:15:46.826948361 +0200
+++ /work/SRC/openSUSE:Factory/.python-iminuit.new.1533/python-iminuit.changes  
2023-05-05 15:58:25.496476952 +0200
@@ -1,0 +2,11 @@
+Thu May  4 15:37:09 UTC 2023 - Atri Bhattacharya <badshah...@gmail.com>
+
+- Update to version 2.21.3:
+  * Better docs for limits from annotated model parameters
+    (gh#scikit-hep/scikit-hep-testdata#853).
+  * Bump pypa/cibuildwheel from 2.12.0 to 2.12.1
+    (gh#scikit-hep/scikit-hep-testdata#855).
+  * fix template input modification bug in Template class
+    (gh#scikit-hep/scikit-hep-testdata#856).
+
+-------------------------------------------------------------------

Old:
----
  iminuit-2.21.2.tar.gz

New:
----
  iminuit-2.21.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-iminuit.spec ++++++
--- /var/tmp/diff_new_pack.WbBP4X/_old  2023-05-05 15:58:25.944479518 +0200
+++ /var/tmp/diff_new_pack.WbBP4X/_new  2023-05-05 15:58:25.944479518 +0200
@@ -30,7 +30,7 @@
 
 %define modname iminuit
 Name:           python-%{modname}
-Version:        2.21.2
+Version:        2.21.3
 Release:        0
 Summary:        Python bindings for MINUIT2
 License:        MIT

++++++ iminuit-2.21.2.tar.gz -> iminuit-2.21.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iminuit-2.21.2/PKG-INFO new/iminuit-2.21.3/PKG-INFO
--- old/iminuit-2.21.2/PKG-INFO 2023-03-19 11:07:59.110663700 +0100
+++ new/iminuit-2.21.3/PKG-INFO 2023-04-03 13:36:03.895256000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: iminuit
-Version: 2.21.2
+Version: 2.21.3
 Summary: Jupyter-friendly Python frontend for MINUIT2 in C++
 Maintainer: Hans Dembinski
 Maintainer-email: hans.dembin...@gmail.com
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iminuit-2.21.2/pyproject.toml 
new/iminuit-2.21.3/pyproject.toml
--- old/iminuit-2.21.2/pyproject.toml   2023-03-19 11:07:25.000000000 +0100
+++ new/iminuit-2.21.3/pyproject.toml   2023-04-03 13:35:26.000000000 +0200
@@ -8,7 +8,7 @@
 [project]
 name = "iminuit"
 description = "Jupyter-friendly Python frontend for MINUIT2 in C++"
-version = "2.21.2"
+version = "2.21.3"
 maintainers = [
     { name = "Hans Dembinski" },
     { email = "hans.dembin...@gmail.com" },
@@ -50,6 +50,7 @@
     "coverage",
     "cython",
     "ipywidgets",
+    "ipykernel",  # needed by ipywidgets 8.0.6
     "joblib",
     "jacobi",
     "matplotlib",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iminuit-2.21.2/src/iminuit/cost.py 
new/iminuit-2.21.3/src/iminuit/cost.py
--- old/iminuit-2.21.2/src/iminuit/cost.py      2023-03-19 11:07:25.000000000 
+0100
+++ new/iminuit-2.21.3/src/iminuit/cost.py      2023-04-03 13:35:26.000000000 
+0200
@@ -38,6 +38,19 @@
 each data set. Gaussian penalty terms can also be added to the cost function 
to introduce
 external knowledge about a parameter.
 
+Model parameter limits
+----------------------
+The Minuit algorithms support box constrains in parameter space. A 
user-defined model can
+declare that a parameter is only valid over an interval on the real line with 
the
+``Annotated`` type annotation, see :class:`iminuit.Minuit` for details. A 
typical example
+is the sigma parameter of a normal distribution, which must be positive. The 
cost
+functions defined here propagate this information to :class:`iminuit.Minuit`.
+
+Note: The :class:`Template` declares that the template amplitudes must be 
non-negative,
+which is usually the right choice, however, it may be desirable to fit 
templates which can
+have negative amplitudes. To achieve this, simply reset the limits with
+:attr:`iminuit.Minuit.limits` after creating the Minuit instance.
+
 Notes
 -----
 The cost functions defined here have been optimized with knowledge about 
implementation
@@ -1259,12 +1272,12 @@
                     # template is weighted
                     if tt.ndim != ndim + 1 or tt.shape[:-1] != shape:
                         raise ValueError("shapes of n and templates do not 
match")
-                    t1 = tt[..., 0]
-                    t2 = tt[..., 1]
+                    t1 = tt[..., 0].copy()
+                    t2 = tt[..., 1].copy()
                 else:
                     if tt.ndim != ndim or tt.shape != shape:
                         raise ValueError("shapes of n and templates do not 
match")
-                    t1 = tt
+                    t1 = tt.copy()
                     t2 = tt.copy()
                 # normalize to unity
                 f = 1 / np.sum(t1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iminuit-2.21.2/src/iminuit.egg-info/PKG-INFO 
new/iminuit-2.21.3/src/iminuit.egg-info/PKG-INFO
--- old/iminuit-2.21.2/src/iminuit.egg-info/PKG-INFO    2023-03-19 
11:07:59.000000000 +0100
+++ new/iminuit-2.21.3/src/iminuit.egg-info/PKG-INFO    2023-04-03 
13:36:03.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: iminuit
-Version: 2.21.2
+Version: 2.21.3
 Summary: Jupyter-friendly Python frontend for MINUIT2 in C++
 Maintainer: Hans Dembinski
 Maintainer-email: hans.dembin...@gmail.com
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iminuit-2.21.2/src/iminuit.egg-info/requires.txt 
new/iminuit-2.21.3/src/iminuit.egg-info/requires.txt
--- old/iminuit-2.21.2/src/iminuit.egg-info/requires.txt        2023-03-19 
11:07:59.000000000 +0100
+++ new/iminuit-2.21.3/src/iminuit.egg-info/requires.txt        2023-04-03 
13:36:03.000000000 +0200
@@ -18,6 +18,7 @@
 coverage
 cython
 ipywidgets
+ipykernel
 joblib
 jacobi
 matplotlib
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iminuit-2.21.2/tests/test_cost.py 
new/iminuit-2.21.3/tests/test_cost.py
--- old/iminuit-2.21.2/tests/test_cost.py       2023-03-19 11:07:25.000000000 
+0100
+++ new/iminuit-2.21.3/tests/test_cost.py       2023-04-03 13:35:26.000000000 
+0200
@@ -1182,6 +1182,27 @@
         assert_allclose(m.values, [2, 4], atol=1e-2)
 
 
+@pytest.mark.parametrize(
+    "template",
+    (
+        (np.array([1.0, 1.0, 0.0]), np.array([0.0, 1.0, 3.0])),
+        (
+            np.array([[1.0, 1.0], [1.0, 1.0], [0.0, 0.0]]),
+            np.array([[0.0, 0.0], [1.0, 1.0], [3.0, 3.0]]),
+        ),
+    ),
+)
+def test_Template_does_not_modify_inputs(template):
+    from copy import deepcopy
+
+    xe = np.array([0, 1, 2, 3])
+    template_copy = deepcopy(template)
+    n = template[0] + template[1]
+
+    Template(n, xe, template, method="da")
+    assert_equal(template, template_copy)
+
+
 def generate(rng, nmc, truth, bins, tf=1, df=1):
     xe = np.linspace(0, 2, bins + 1)
     b = np.diff(truncexpon(1, 0, 2).cdf(xe))

Reply via email to