CUQIpy 1.3.0.post0.dev58__py3-none-any.whl → 1.3.0.post0.dev70__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/__init__.py +1 -1
- cuqi/distribution/_uniform.py +35 -1
- {cuqipy-1.3.0.post0.dev58.dist-info → cuqipy-1.3.0.post0.dev70.dist-info}/METADATA +3 -2
- {cuqipy-1.3.0.post0.dev58.dist-info → cuqipy-1.3.0.post0.dev70.dist-info}/RECORD +8 -8
- {cuqipy-1.3.0.post0.dev58.dist-info → cuqipy-1.3.0.post0.dev70.dist-info}/WHEEL +1 -1
- {cuqipy-1.3.0.post0.dev58.dist-info → cuqipy-1.3.0.post0.dev70.dist-info/licenses}/LICENSE +0 -0
- {cuqipy-1.3.0.post0.dev58.dist-info → cuqipy-1.3.0.post0.dev70.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-
|
|
11
|
+
"date": "2025-04-10T10:13:59+0200",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "1.3.0.post0.
|
|
14
|
+
"full-revisionid": "c18048b15c6ec1a66e8e4bc097e0180fc3d4e47e",
|
|
15
|
+
"version": "1.3.0.post0.dev70"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
cuqi/distribution/__init__.py
CHANGED
|
@@ -14,6 +14,6 @@ from ._lognormal import Lognormal
|
|
|
14
14
|
from ._normal import Normal
|
|
15
15
|
from ._truncated_normal import TruncatedNormal
|
|
16
16
|
from ._posterior import Posterior
|
|
17
|
-
from ._uniform import Uniform
|
|
17
|
+
from ._uniform import Uniform, UnboundedUniform
|
|
18
18
|
from ._custom import UserDefinedDistribution, DistributionGallery
|
|
19
19
|
from ._joint_distribution import JointDistribution, _StackedJointDistribution, MultipleLikelihoodPosterior
|
cuqi/distribution/_uniform.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import numpy as np
|
|
2
2
|
from cuqi.distribution import Distribution
|
|
3
|
+
from cuqi.geometry import Geometry
|
|
3
4
|
|
|
4
5
|
class Uniform(Distribution):
|
|
5
6
|
|
|
@@ -57,4 +58,37 @@ class Uniform(Distribution):
|
|
|
57
58
|
else:
|
|
58
59
|
s = np.random.uniform(self.low, self.high, (N,self.dim)).T
|
|
59
60
|
|
|
60
|
-
return s
|
|
61
|
+
return s
|
|
62
|
+
|
|
63
|
+
class UnboundedUniform(Distribution):
|
|
64
|
+
"""
|
|
65
|
+
Unbounded uniform distribution. This is a special case of the
|
|
66
|
+
Uniform distribution, where the lower and upper bounds are set to
|
|
67
|
+
-inf and inf, respectively. This distribution is not normalizable,
|
|
68
|
+
and therefore cannot be sampled from. It is mainly used for
|
|
69
|
+
initializing non-informative priors.
|
|
70
|
+
Parameters
|
|
71
|
+
----------
|
|
72
|
+
geometry : int or Geometry
|
|
73
|
+
The geometry of the distribution. If an integer is given, it is
|
|
74
|
+
interpreted as the dimension of the distribution. If a
|
|
75
|
+
Geometry object is given, its par_dim attribute is used.
|
|
76
|
+
"""
|
|
77
|
+
def __init__(self, geometry, is_symmetric=True, **kwargs):
|
|
78
|
+
super().__init__(geometry=geometry, is_symmetric=is_symmetric, **kwargs)
|
|
79
|
+
|
|
80
|
+
def logpdf(self, x):
|
|
81
|
+
"""
|
|
82
|
+
Evaluate the logarithm of the unnormalized PDF at the given values of x.
|
|
83
|
+
"""
|
|
84
|
+
# Always return 1.0 (the unnormalized log PDF)
|
|
85
|
+
return 1.0
|
|
86
|
+
|
|
87
|
+
def gradient(self, x):
|
|
88
|
+
"""
|
|
89
|
+
Computes the gradient of logpdf at the given values of x.
|
|
90
|
+
"""
|
|
91
|
+
return np.zeros_like(x)
|
|
92
|
+
|
|
93
|
+
def _sample(self, N=1, rng=None):
|
|
94
|
+
raise NotImplementedError("Cannot sample from UnboundedUniform distribution")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: CUQIpy
|
|
3
|
-
Version: 1.3.0.post0.
|
|
3
|
+
Version: 1.3.0.post0.dev70
|
|
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
|
|
@@ -205,6 +205,7 @@ Requires-Dist: numpy>=1.17.0
|
|
|
205
205
|
Requires-Dist: scipy<1.13
|
|
206
206
|
Requires-Dist: arviz
|
|
207
207
|
Requires-Dist: tqdm
|
|
208
|
+
Dynamic: license-file
|
|
208
209
|
|
|
209
210
|
<div align="center">
|
|
210
211
|
<img src="https://cuqi-dtu.github.io/CUQIpy/_static/logo.png" alt="CUQIpy logo" width="250"/>
|
|
@@ -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=x3zpGp2Yt3uRSPN-QiV1WPjz_E6y4Vd8e_5YzWKqC-4,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
|
|
@@ -14,7 +14,7 @@ cuqi/data/cookie.png,sha256=mr6wUeoIUc5VC2qYj8vafOmTbcRwz0fHz4IIPK9_PnE,984680
|
|
|
14
14
|
cuqi/data/satellite.mat,sha256=a0Nz_Ak-Y0m360dH74pa_rpk-MhaQ91ftGTKhQX7I8g,16373
|
|
15
15
|
cuqi/density/__init__.py,sha256=0zfVcPgqdqiPkss5n_WP_PUt-G3ovHXjokhqEKIlLwA,48
|
|
16
16
|
cuqi/density/_density.py,sha256=BG7gtP0cbFYLVgjYQGkNAhM95PR5ocBVLKRlOVX2PyM,7253
|
|
17
|
-
cuqi/distribution/__init__.py,sha256=
|
|
17
|
+
cuqi/distribution/__init__.py,sha256=f-HM-SUrvPO66_FAJ6k4TffBq4H94OusRMDOJgcJU2w,779
|
|
18
18
|
cuqi/distribution/_beta.py,sha256=QlibnuHNcvWjl-du5aRc9QuzS3n4PsyD_8Nc47w-E0Q,2903
|
|
19
19
|
cuqi/distribution/_cauchy.py,sha256=Qwi21WkwUBnBkLbhR-yCGO0tQ_U_3mmvR0pDMPPPB5c,3296
|
|
20
20
|
cuqi/distribution/_cmrf.py,sha256=tCbEulM_O7FB3C_W-3IqZp9zGHkTofCdFF0ybHc9UZI,3745
|
|
@@ -33,7 +33,7 @@ cuqi/distribution/_normal.py,sha256=vhIiAseW09IKh1uy0KUq7RP1IuY7hH5aNM1W_R8Gd_Q,
|
|
|
33
33
|
cuqi/distribution/_posterior.py,sha256=zAfL0GECxekZ2lBt1W6_LN0U_xskMwK4VNce5xAF7ig,5018
|
|
34
34
|
cuqi/distribution/_smoothed_laplace.py,sha256=p-1Y23mYA9omwiHGkEuv3T2mwcPAAoNlCr7T8osNkjE,2925
|
|
35
35
|
cuqi/distribution/_truncated_normal.py,sha256=sPaveXTij_yRZg-609zfwzGjHJOzZVenvYaYK0krUec,4240
|
|
36
|
-
cuqi/distribution/_uniform.py,sha256=
|
|
36
|
+
cuqi/distribution/_uniform.py,sha256=eONkPlVX3EIZ9x1vHa3Ul60NJsbuWVCabTuAJVH2GGk,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
|
|
@@ -93,8 +93,8 @@ cuqi/testproblem/_testproblem.py,sha256=x769LwwRdJdzIiZkcQUGb_5-vynNTNALXWKato7s
|
|
|
93
93
|
cuqi/utilities/__init__.py,sha256=d5QXRzmI6EchS9T4b7eTezSisPWuWklO8ey4YBx9kI0,569
|
|
94
94
|
cuqi/utilities/_get_python_variable_name.py,sha256=wxpCaj9f3ZtBNqlGmmuGiITgBaTsY-r94lUIlK6UAU4,2043
|
|
95
95
|
cuqi/utilities/_utilities.py,sha256=en4woCU0LJvdrnmjns5OMLMmRguWWTQxhBMuFGxPK4U,18415
|
|
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.
|
|
96
|
+
cuqipy-1.3.0.post0.dev70.dist-info/licenses/LICENSE,sha256=kJWRPrtRoQoZGXyyvu50Uc91X6_0XRaVfT0YZssicys,10799
|
|
97
|
+
cuqipy-1.3.0.post0.dev70.dist-info/METADATA,sha256=p9-ZWhhvEJ2jhjPRIldlRrO6bF2hGYKN9AeEuBYs0WM,18550
|
|
98
|
+
cuqipy-1.3.0.post0.dev70.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
99
|
+
cuqipy-1.3.0.post0.dev70.dist-info/top_level.txt,sha256=AgmgMc6TKfPPqbjV0kvAoCBN334i_Lwwojc7HE3ZwD0,5
|
|
100
|
+
cuqipy-1.3.0.post0.dev70.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|