CUQIpy 1.3.0.post0.dev70__py3-none-any.whl → 1.3.0.post0.dev86__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of CUQIpy might be problematic. Click here for more details.
- cuqi/_version.py +3 -3
- cuqi/distribution/_truncated_normal.py +1 -1
- cuqi/distribution/_uniform.py +1 -1
- cuqi/implicitprior/_regularizedGaussian.py +8 -2
- cuqi/utilities/_utilities.py +1 -1
- {cuqipy-1.3.0.post0.dev70.dist-info → cuqipy-1.3.0.post0.dev86.dist-info}/METADATA +3 -2
- {cuqipy-1.3.0.post0.dev70.dist-info → cuqipy-1.3.0.post0.dev86.dist-info}/RECORD +10 -10
- {cuqipy-1.3.0.post0.dev70.dist-info → cuqipy-1.3.0.post0.dev86.dist-info}/WHEEL +0 -0
- {cuqipy-1.3.0.post0.dev70.dist-info → cuqipy-1.3.0.post0.dev86.dist-info}/licenses/LICENSE +0 -0
- {cuqipy-1.3.0.post0.dev70.dist-info → cuqipy-1.3.0.post0.dev86.dist-info}/top_level.txt +0 -0
cuqi/_version.py
CHANGED
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2025-04-10T10:
|
|
11
|
+
"date": "2025-04-10T10:50:04+0200",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "1.3.0.post0.
|
|
14
|
+
"full-revisionid": "fe056d15f6ff918511cf7ee579dc8e7689c1dbc4",
|
|
15
|
+
"version": "1.3.0.post0.dev86"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -107,7 +107,7 @@ class TruncatedNormal(Distribution):
|
|
|
107
107
|
"""
|
|
108
108
|
# check if x falls in the range between np.array a and b
|
|
109
109
|
if np.any(x < self.low) or np.any(x > self.high):
|
|
110
|
-
return np.
|
|
110
|
+
return np.nan*np.ones_like(x)
|
|
111
111
|
else:
|
|
112
112
|
return self._normal.gradient(x, *args, **kwargs)
|
|
113
113
|
|
cuqi/distribution/_uniform.py
CHANGED
|
@@ -189,12 +189,18 @@ class RegularizedGaussian(Distribution):
|
|
|
189
189
|
elif c_lower == "increasing":
|
|
190
190
|
if not isinstance(self.geometry, Continuous1D):
|
|
191
191
|
raise ValueError("Geometry not supported for " + c_lower)
|
|
192
|
-
|
|
192
|
+
if hasattr(spoptimize, 'isotonic_regression'):
|
|
193
|
+
self._constraint_prox = lambda z, _: spoptimize.isotonic_regression(z, increasing=True).x
|
|
194
|
+
else:
|
|
195
|
+
raise AttributeError(f"The function 'isotonic_regression' does not exist in scipy.optimize. Installed scipy version: {spoptimize.__version__}. You need to install a scipy >= 1.12.0")
|
|
193
196
|
self._preset["constraint"] = "increasing"
|
|
194
197
|
elif c_lower == "decreasing":
|
|
195
198
|
if not isinstance(self.geometry, Continuous1D):
|
|
196
199
|
raise ValueError("Geometry not supported for " + c_lower)
|
|
197
|
-
|
|
200
|
+
if hasattr(spoptimize, 'isotonic_regression'):
|
|
201
|
+
self._constraint_prox = lambda z, _: spoptimize.isotonic_regression(z, increasing=False).x
|
|
202
|
+
else:
|
|
203
|
+
raise AttributeError(f"The function 'isotonic_regression' does not exist in scipy.optimize. Installed scipy version: {spoptimize.__version__}. You need to install a scipy >= 1.12.0")
|
|
198
204
|
self._preset["constraint"] = "decreasing"
|
|
199
205
|
elif c_lower == "convex":
|
|
200
206
|
if not isinstance(self.geometry, Continuous1D):
|
cuqi/utilities/_utilities.py
CHANGED
|
@@ -188,7 +188,7 @@ def approx_derivative(func, wrt, direction=None, epsilon=np.sqrt(np.finfo(float)
|
|
|
188
188
|
# We compute the Jacobian matrix of func using forward differences.
|
|
189
189
|
# If the function is scalar-valued, we compute the gradient instead.
|
|
190
190
|
# If the direction is provided, we compute the direction-Jacobian product.
|
|
191
|
-
wrt = np.
|
|
191
|
+
wrt = np.asarray(wrt)
|
|
192
192
|
f0 = func(wrt)
|
|
193
193
|
Matr = np.zeros([infer_len(wrt), infer_len(f0)])
|
|
194
194
|
dx = np.zeros(len(wrt))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: CUQIpy
|
|
3
|
-
Version: 1.3.0.post0.
|
|
3
|
+
Version: 1.3.0.post0.dev86
|
|
4
4
|
Summary: Computational Uncertainty Quantification for Inverse problems in Python
|
|
5
5
|
Maintainer-email: "Nicolai A. B. Riis" <nabr@dtu.dk>, "Jakob S. Jørgensen" <jakj@dtu.dk>, "Amal M. Alghamdi" <amaal@dtu.dk>, Chao Zhang <chaz@dtu.dk>
|
|
6
6
|
License: Apache License
|
|
@@ -202,7 +202,8 @@ Description-Content-Type: text/markdown
|
|
|
202
202
|
License-File: LICENSE
|
|
203
203
|
Requires-Dist: matplotlib
|
|
204
204
|
Requires-Dist: numpy>=1.17.0
|
|
205
|
-
Requires-Dist: scipy
|
|
205
|
+
Requires-Dist: scipy==1.12.0; python_version <= "3.9"
|
|
206
|
+
Requires-Dist: scipy; python_version > "3.9"
|
|
206
207
|
Requires-Dist: arviz
|
|
207
208
|
Requires-Dist: tqdm
|
|
208
209
|
Dynamic: license-file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
cuqi/__init__.py,sha256=LsGilhl-hBLEn6Glt8S_l0OJzAA1sKit_rui8h-D-p0,488
|
|
2
2
|
cuqi/_messages.py,sha256=fzEBrZT2kbmfecBBPm7spVu7yHdxGARQB4QzXhJbCJ0,415
|
|
3
|
-
cuqi/_version.py,sha256=
|
|
3
|
+
cuqi/_version.py,sha256=5BoF7RelweJtRYABv01YoLMQTIvAp9dGHYbyo9mk5u4,509
|
|
4
4
|
cuqi/config.py,sha256=wcYvz19wkeKW2EKCGIKJiTpWt5kdaxyt4imyRkvtTRA,526
|
|
5
5
|
cuqi/diagnostics.py,sha256=5OrbJeqpynqRXOe5MtOKKhe7EAVdOEpHIqHnlMW9G_c,3029
|
|
6
6
|
cuqi/array/__init__.py,sha256=-EeiaiWGNsE3twRS4dD814BIlfxEsNkTCZUc5gjOXb0,30
|
|
@@ -32,8 +32,8 @@ cuqi/distribution/_modifiedhalfnormal.py,sha256=ErULXUFRjbMyCYywaOzfuxtoy-XQmC0M
|
|
|
32
32
|
cuqi/distribution/_normal.py,sha256=vhIiAseW09IKh1uy0KUq7RP1IuY7hH5aNM1W_R8Gd_Q,2912
|
|
33
33
|
cuqi/distribution/_posterior.py,sha256=zAfL0GECxekZ2lBt1W6_LN0U_xskMwK4VNce5xAF7ig,5018
|
|
34
34
|
cuqi/distribution/_smoothed_laplace.py,sha256=p-1Y23mYA9omwiHGkEuv3T2mwcPAAoNlCr7T8osNkjE,2925
|
|
35
|
-
cuqi/distribution/_truncated_normal.py,sha256=
|
|
36
|
-
cuqi/distribution/_uniform.py,sha256=
|
|
35
|
+
cuqi/distribution/_truncated_normal.py,sha256=_ez3MmO6qpBeP6BKCUlW3IgxuF7k--A7jPGPUhtYK0g,4240
|
|
36
|
+
cuqi/distribution/_uniform.py,sha256=fVgj_4SBav8JMc1pNAO1l_CZ9ZwdoMIpN9iQ3i9_Z0Q,3255
|
|
37
37
|
cuqi/experimental/__init__.py,sha256=bIQ9OroeitHbwgNe3wI_JvzkILK0N25Tt7wpquPoU3w,129
|
|
38
38
|
cuqi/experimental/algebra/__init__.py,sha256=btRAWG58ZfdtK0afXKOg60AX7d76KMBjlZa4AWBCCgU,81
|
|
39
39
|
cuqi/experimental/algebra/_ast.py,sha256=PdPz19cJMjvnMx4KEzhn4gvxIZX_UViE33Mbttj_5Xw,9873
|
|
@@ -59,7 +59,7 @@ cuqi/geometry/__init__.py,sha256=Tz1WGzZBY-QGH3c0GiyKm9XHN8MGGcnU6TUHLZkzB3o,842
|
|
|
59
59
|
cuqi/geometry/_geometry.py,sha256=W-oQTZPelVS7fN9qZj6bNBuh-yY0eqOHJ39UwB-WmQY,47562
|
|
60
60
|
cuqi/implicitprior/__init__.py,sha256=6z3lvw-tWDyjZSpB3pYzvijSMK9Zlf1IYqOVTtMD2h4,309
|
|
61
61
|
cuqi/implicitprior/_regularizedGMRF.py,sha256=BUeT4rwJzary9K56fkxCNGCeKZd-2VSgOT8XNHxFPRE,6345
|
|
62
|
-
cuqi/implicitprior/_regularizedGaussian.py,sha256=
|
|
62
|
+
cuqi/implicitprior/_regularizedGaussian.py,sha256=9BSKHGEW0OT9OIt_42strDzxBM8mB6A-blcf0kEguHw,21836
|
|
63
63
|
cuqi/implicitprior/_regularizedUnboundedUniform.py,sha256=uHGYYnTjVxdPbY-5JwocFOH0sHRfGrrLiHWahzH9R8A,3533
|
|
64
64
|
cuqi/implicitprior/_restorator.py,sha256=Z350XUJEt7N59Qw-SIUaBljQNDJk4Zb0i_KRFrt2DCg,10087
|
|
65
65
|
cuqi/likelihood/__init__.py,sha256=QXif382iwZ5bT3ZUqmMs_n70JVbbjxbqMrlQYbMn4Zo,1776
|
|
@@ -92,9 +92,9 @@ cuqi/testproblem/__init__.py,sha256=DWTOcyuNHMbhEuuWlY5CkYkNDSAqhvsKmJXBLivyblU,
|
|
|
92
92
|
cuqi/testproblem/_testproblem.py,sha256=x769LwwRdJdzIiZkcQUGb_5-vynNTNALXWKato7sS0Q,52540
|
|
93
93
|
cuqi/utilities/__init__.py,sha256=d5QXRzmI6EchS9T4b7eTezSisPWuWklO8ey4YBx9kI0,569
|
|
94
94
|
cuqi/utilities/_get_python_variable_name.py,sha256=wxpCaj9f3ZtBNqlGmmuGiITgBaTsY-r94lUIlK6UAU4,2043
|
|
95
|
-
cuqi/utilities/_utilities.py,sha256=
|
|
96
|
-
cuqipy-1.3.0.post0.
|
|
97
|
-
cuqipy-1.3.0.post0.
|
|
98
|
-
cuqipy-1.3.0.post0.
|
|
99
|
-
cuqipy-1.3.0.post0.
|
|
100
|
-
cuqipy-1.3.0.post0.
|
|
95
|
+
cuqi/utilities/_utilities.py,sha256=as8cFswoxROS0Z7WUKzLIE-ZtEKCXes5M3Gdmmb47No,18414
|
|
96
|
+
cuqipy-1.3.0.post0.dev86.dist-info/licenses/LICENSE,sha256=kJWRPrtRoQoZGXyyvu50Uc91X6_0XRaVfT0YZssicys,10799
|
|
97
|
+
cuqipy-1.3.0.post0.dev86.dist-info/METADATA,sha256=lG1Acs-TjKb60yfRHgywc3q1EQY1HuI9bjLQA5CAQNE,18623
|
|
98
|
+
cuqipy-1.3.0.post0.dev86.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
99
|
+
cuqipy-1.3.0.post0.dev86.dist-info/top_level.txt,sha256=AgmgMc6TKfPPqbjV0kvAoCBN334i_Lwwojc7HE3ZwD0,5
|
|
100
|
+
cuqipy-1.3.0.post0.dev86.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|