Skip to content

Commit 50ed12c

Browse files
committed
fix error in gaussian to dirac
1 parent d6241df commit 50ed12c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "deterministic_gaussian_sampling"
7-
version = "0.1.1"
7+
version = "0.1.2"
88
description = "Python library for Localized Distribution (LCD)-based Gaussian sampling."
99
readme = "README.md"
1010
requires-python = ">=3.8"

src/deterministic_gaussian_sampling/approximation/gaussian_to_dirac.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ def __del__(self):
2727
)
2828

2929
def approximate_double(
30-
self, covDiag: numpy.ndarray,
30+
self,
31+
covDiag: numpy.ndarray,
3132
L: int,
3233
N: int,
3334
x: numpy.ndarray,
@@ -40,7 +41,7 @@ def approximate_double(
4041
minimizer_result = ctypes_wrapper.GslMinimizerResultCTypes()
4142
success = cdll.gm_to_dirac_short_double_approximate(
4243
self.gm_to_dirac_double,
43-
covDiag,
44+
self._check_numpy_ndarray(covDiag, covDiag.shape[0], covDiag.shape[0]),
4445
ctypes.c_int(L),
4546
ctypes.c_int(N),
4647
ctypes.c_int(100),

0 commit comments

Comments
 (0)