CUQIpy 1.0.0.post0.dev384__py3-none-any.whl → 1.0.0.post0.dev387__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: CUQIpy
3
- Version: 1.0.0.post0.dev384
3
+ Version: 1.0.0.post0.dev387
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=IKVgkfhXqLynqXrlVfTXOFBq5r4w6rJcCBTk1PNkuKA,510
3
+ cuqi/_version.py,sha256=soBTqpAZKV_ZpGyEzLdCrnLrfvUMogacRY4MNlB-uPI,510
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
@@ -18,7 +18,7 @@ cuqi/distribution/__init__.py,sha256=4vVLArg6NVzBj67vVioK8BY6wISJKb5cOxdoHMuUb_s
18
18
  cuqi/distribution/_beta.py,sha256=hdAc6Tbuz9Yqf76NSHxpaUgN7s6Z2lNV7YSRD3JhyCU,2997
19
19
  cuqi/distribution/_cauchy.py,sha256=UsVXYz8HhagXN5fIWSAIyELqhsJAX_-wk9kkRGgRmA8,3296
20
20
  cuqi/distribution/_cmrf.py,sha256=tCbEulM_O7FB3C_W-3IqZp9zGHkTofCdFF0ybHc9UZI,3745
21
- cuqi/distribution/_custom.py,sha256=uUJwGlGjcMY89mIyu9nFI3OafLOMgn8uAEMfCbTDzi0,10661
21
+ cuqi/distribution/_custom.py,sha256=3toVV_ntnWAGlI7pNQLS7-7m5i-34sTWQrxL-SMweq0,10681
22
22
  cuqi/distribution/_distribution.py,sha256=G7BCpVueK4QLoLa_hu9h-Euh58Yp9SrgUKuudUlg-pw,18351
23
23
  cuqi/distribution/_gamma.py,sha256=9vljt5iaBDCHRhrVCMLc2RWDuBchZRQcv9buJMDYPlM,3434
24
24
  cuqi/distribution/_gaussian.py,sha256=DmmgVxKp4iEiEYWDdDcRoh35y14Oepn-zDHex0WVaYo,33316
@@ -63,7 +63,7 @@ cuqi/operator/_operator.py,sha256=yNwPTh7jR07AiKMbMQQ5_54EgirlKFsbq9JN1EODaQI,88
63
63
  cuqi/pde/__init__.py,sha256=NyS_ZYruCvy-Yg24qKlwm3ZIX058kLNQX9bqs-xg4ZM,99
64
64
  cuqi/pde/_pde.py,sha256=WRkOYyIdT_T3aZepRh0aS9C5nBbUZUcHaA80iSRvgoo,12572
65
65
  cuqi/problem/__init__.py,sha256=JxJty4JqHTOqSG6NeTGiXRQ7OLxiRK9jvVq3lXLeIRw,38
66
- cuqi/problem/_problem.py,sha256=Irk4OlTAhZAX81excesi8ANokz2GSAS3z_mcvx8Wqdc,32018
66
+ cuqi/problem/_problem.py,sha256=XvNbo7BXcnDZvj3n36f879QknTYg3_-jnKhkVvqUQto,31944
67
67
  cuqi/sampler/__init__.py,sha256=D-dYa0gFgIwQukP8_VKhPGmlGKXbvVo7YqaET4SdAeQ,382
68
68
  cuqi/sampler/_conjugate.py,sha256=ztmUR3V3qZk9zelKx48ULnmMs_zKTDUfohc256VOIe8,2753
69
69
  cuqi/sampler/_conjugate_approx.py,sha256=xX-X71EgxGnZooOY6CIBhuJTs3dhcKfoLnoFxX3CO2g,1938
@@ -85,8 +85,8 @@ cuqi/testproblem/_testproblem.py,sha256=x769LwwRdJdzIiZkcQUGb_5-vynNTNALXWKato7s
85
85
  cuqi/utilities/__init__.py,sha256=T4tLsC215MknBCsw_C0Qeeg_ox26aDUrCA5hbWvNQkU,387
86
86
  cuqi/utilities/_get_python_variable_name.py,sha256=QwlBVj2koJRA8s8pWd554p7-ElcI7HUwY32HknaR92E,1827
87
87
  cuqi/utilities/_utilities.py,sha256=MWAqV6L5btMpWwlUzrZYuV2VeSpfTbOaLRMRkuw2WIA,8509
88
- CUQIpy-1.0.0.post0.dev384.dist-info/LICENSE,sha256=kJWRPrtRoQoZGXyyvu50Uc91X6_0XRaVfT0YZssicys,10799
89
- CUQIpy-1.0.0.post0.dev384.dist-info/METADATA,sha256=5xT68suvERdJf0DPgCPA23chSdG2yRnQQJhW_zSnjps,18393
90
- CUQIpy-1.0.0.post0.dev384.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
91
- CUQIpy-1.0.0.post0.dev384.dist-info/top_level.txt,sha256=AgmgMc6TKfPPqbjV0kvAoCBN334i_Lwwojc7HE3ZwD0,5
92
- CUQIpy-1.0.0.post0.dev384.dist-info/RECORD,,
88
+ CUQIpy-1.0.0.post0.dev387.dist-info/LICENSE,sha256=kJWRPrtRoQoZGXyyvu50Uc91X6_0XRaVfT0YZssicys,10799
89
+ CUQIpy-1.0.0.post0.dev387.dist-info/METADATA,sha256=gfnGhOqgNY_pVYwD5t9bQ-8GD9GVxvBCMxO5PClzQVY,18393
90
+ CUQIpy-1.0.0.post0.dev387.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
91
+ CUQIpy-1.0.0.post0.dev387.dist-info/top_level.txt,sha256=AgmgMc6TKfPPqbjV0kvAoCBN334i_Lwwojc7HE3ZwD0,5
92
+ CUQIpy-1.0.0.post0.dev387.dist-info/RECORD,,
cuqi/_version.py CHANGED
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2024-07-05T09:29:07+0200",
11
+ "date": "2024-07-05T10:30:02+0300",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "3e3d762fab019f39257708bb9cdf5abc3681f196",
15
- "version": "1.0.0.post0.dev384"
14
+ "full-revisionid": "192b464555ba1f70ce8b0041ecd49ff4978d5689",
15
+ "version": "1.0.0.post0.dev387"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -50,13 +50,13 @@ class UserDefinedDistribution(Distribution):
50
50
  if self.logpdf_func is not None:
51
51
  return self.logpdf_func(x)
52
52
  else:
53
- raise Exception("logpdf_func is not defined.")
53
+ raise NotImplementedError("logpdf_func is not defined.")
54
54
 
55
55
  def _gradient(self, x):
56
56
  if self.gradient_func is not None:
57
57
  return self.gradient_func(x)
58
58
  else:
59
- raise Exception("gradient_func is not defined.")
59
+ raise NotImplementedError("gradient_func is not defined.")
60
60
 
61
61
  def _sample(self, N=1, rng=None):
62
62
  #TODO(nabr) allow sampling more than 1 sample and potentially rng?
cuqi/problem/_problem.py CHANGED
@@ -710,8 +710,7 @@ class BayesianProblem(object):
710
710
  # Require gradient?
711
711
  if must_have_gradient:
712
712
  try:
713
- posterior.prior.gradient(np.zeros(posterior.prior.dim))
714
- posterior.likelihood.gradient(np.zeros(posterior.likelihood.dim))
713
+ posterior.posterior.gradient(np.zeros(posterior.posterior.dim))
715
714
  G = True
716
715
  except (NotImplementedError, AttributeError):
717
716
  G = False