CUQIpy 1.1.1.post0.dev104__py3-none-any.whl → 1.2.0.post0.dev6__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.
- {CUQIpy-1.1.1.post0.dev104.dist-info → CUQIpy-1.2.0.post0.dev6.dist-info}/METADATA +1 -1
- {CUQIpy-1.1.1.post0.dev104.dist-info → CUQIpy-1.2.0.post0.dev6.dist-info}/RECORD +7 -7
- {CUQIpy-1.1.1.post0.dev104.dist-info → CUQIpy-1.2.0.post0.dev6.dist-info}/WHEEL +1 -1
- cuqi/_version.py +3 -3
- cuqi/distribution/_uniform.py +12 -0
- {CUQIpy-1.1.1.post0.dev104.dist-info → CUQIpy-1.2.0.post0.dev6.dist-info}/LICENSE +0 -0
- {CUQIpy-1.1.1.post0.dev104.dist-info → CUQIpy-1.2.0.post0.dev6.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: CUQIpy
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0.post0.dev6
|
|
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
|
|
@@ -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=xb6__fpIlsNEbO-nODNBdf1auVnfH6IOTdnzCGGf1Jg,508
|
|
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,7 +32,7 @@ cuqi/distribution/_modifiedhalfnormal.py,sha256=eCg9YhH-zyX25V5WqdBwQykwG_90lm5Q
|
|
|
32
32
|
cuqi/distribution/_normal.py,sha256=ohBk5bTZbDEkU0JqcNkkSQ4bDhTR2s-PXjA8d91L7Y4,1682
|
|
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/_uniform.py,sha256=
|
|
35
|
+
cuqi/distribution/_uniform.py,sha256=KA8yQ6ZS3nQGS4PYJ4hpDg6Eq8EQKQvPsIpYfR8fj2w,1967
|
|
36
36
|
cuqi/experimental/__init__.py,sha256=vhZvyMX6rl8Y0haqCzGLPz6PSUKyu75XMQbeDHqTTrw,83
|
|
37
37
|
cuqi/experimental/mcmc/__init__.py,sha256=1sn0U6Ep0x5zv2602og2DkV3Bs8hNFOiq7C3VcMimVw,4472
|
|
38
38
|
cuqi/experimental/mcmc/_conjugate.py,sha256=VNPQkGity0mposcqxrx4UIeXm35EvJvZED4p2stffvA,9924
|
|
@@ -85,8 +85,8 @@ cuqi/testproblem/_testproblem.py,sha256=x769LwwRdJdzIiZkcQUGb_5-vynNTNALXWKato7s
|
|
|
85
85
|
cuqi/utilities/__init__.py,sha256=H7xpJe2UinjZftKvE2JuXtTi4DqtkR6uIezStAXwfGg,428
|
|
86
86
|
cuqi/utilities/_get_python_variable_name.py,sha256=QwlBVj2koJRA8s8pWd554p7-ElcI7HUwY32HknaR92E,1827
|
|
87
87
|
cuqi/utilities/_utilities.py,sha256=Jc4knn80vLoA7kgw9FzXwKVFGaNBOXiA9kgvltZU3Ao,11777
|
|
88
|
-
CUQIpy-1.
|
|
89
|
-
CUQIpy-1.
|
|
90
|
-
CUQIpy-1.
|
|
91
|
-
CUQIpy-1.
|
|
92
|
-
CUQIpy-1.
|
|
88
|
+
CUQIpy-1.2.0.post0.dev6.dist-info/LICENSE,sha256=kJWRPrtRoQoZGXyyvu50Uc91X6_0XRaVfT0YZssicys,10799
|
|
89
|
+
CUQIpy-1.2.0.post0.dev6.dist-info/METADATA,sha256=5JyZXn9E9P00XKFW9jfbJNRr5qR75LAYKxOEdcgKbG0,18409
|
|
90
|
+
CUQIpy-1.2.0.post0.dev6.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
91
|
+
CUQIpy-1.2.0.post0.dev6.dist-info/top_level.txt,sha256=AgmgMc6TKfPPqbjV0kvAoCBN334i_Lwwojc7HE3ZwD0,5
|
|
92
|
+
CUQIpy-1.2.0.post0.dev6.dist-info/RECORD,,
|
cuqi/_version.py
CHANGED
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2024-09-
|
|
11
|
+
"date": "2024-09-26T10:45:39+0200",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "1.
|
|
14
|
+
"full-revisionid": "d00b1c910863237ecb20eef45804b254af31f094",
|
|
15
|
+
"version": "1.2.0.post0.dev6"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
cuqi/distribution/_uniform.py
CHANGED
|
@@ -21,6 +21,9 @@ class Uniform(Distribution):
|
|
|
21
21
|
self.high = high
|
|
22
22
|
|
|
23
23
|
def logpdf(self, x):
|
|
24
|
+
"""
|
|
25
|
+
Evaluate the logarithm of the PDF at the given values of x.
|
|
26
|
+
"""
|
|
24
27
|
# First check whether x is outside bounds.
|
|
25
28
|
# It is outside if any coordinate is outside the interval.
|
|
26
29
|
if np.any(x < self.low) or np.any(x > self.high):
|
|
@@ -38,6 +41,15 @@ class Uniform(Distribution):
|
|
|
38
41
|
return_val = np.log(1.0/v)
|
|
39
42
|
return return_val
|
|
40
43
|
|
|
44
|
+
def gradient(self, x):
|
|
45
|
+
"""
|
|
46
|
+
Computes the gradient of logpdf at the given values of x.
|
|
47
|
+
"""
|
|
48
|
+
if np.any(x < self.low) or np.any(x > self.high):
|
|
49
|
+
return np.NaN*np.ones_like(x)
|
|
50
|
+
else:
|
|
51
|
+
return np.zeros_like(x)
|
|
52
|
+
|
|
41
53
|
def _sample(self,N=1, rng=None):
|
|
42
54
|
|
|
43
55
|
if rng is not None:
|
|
File without changes
|
|
File without changes
|