Skip to content

Commit e073162

Browse files
authored
Merge pull request #29 from comet-toolkit/but-fix-truncated-gaussian
bug fix trunctated gaussian
2 parents 9928ba1 + 180d7ee commit e073162

File tree

6 files changed

+28
-5
lines changed

6 files changed

+28
-5
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,5 @@ ENV/
119119

120120
# macOS temporary files
121121
.DS_Store
122+
*.png
123+
*.pdf

comet_maths/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""comet_maths - Mathematical algorithms and tools to use within CoMet toolkit."""
2+
23
from comet_maths.generate_sample.generate_sample import (
34
generate_sample,
45
generate_error_sample,

comet_maths/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.7"
1+
__version__ = "1.0.8"

comet_maths/generate_sample/generate_sample.py

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""describe class"""
2+
23
import copy
34
import warnings
45

@@ -512,21 +513,39 @@ def generate_sample_correlated(
512513
if len(corr_x[i]) == len(u_x[i].ravel()):
513514
# cov_x = cm.convert_corr_to_cov(corr_x[i], u_x[i])
514515
MC_data = generate_sample_corr(
515-
MCsteps, x[i], u_x[i], corr_x[i], dtype=dtype
516+
MCsteps,
517+
x[i],
518+
u_x[i],
519+
corr_x[i],
520+
dtype=dtype,
521+
pdf_shape=pdf_shape,
522+
pdf_params=pdf_params,
516523
)
517524
elif len(corr_x[i]) == len(u_x[i]):
518525
MC_data = np.zeros((MCsteps,) + (u_x[i].shape))
519526
for j in range(len(u_x[i][0])):
520527
# cov_x = cm.convert_corr_to_cov(corr_x[i], u_x[i][:, j])
521528
MC_data[:, :, j] = generate_sample_corr(
522-
MCsteps, x[i][:, j], u_x[i][:, j], corr_x[i], dtype=dtype
529+
MCsteps,
530+
x[i][:, j],
531+
u_x[i][:, j],
532+
corr_x[i],
533+
dtype=dtype,
534+
pdf_shape=pdf_shape,
535+
pdf_params=pdf_params,
523536
)
524537
elif u_x[i].ndim > 1 and len(corr_x[i]) == len(u_x[i][0]):
525538
MC_data = np.zeros((MCsteps,) + (u_x[i].shape))
526539
for j in range(len(u_x[i][:, 0])):
527540
# cov_x = cm.convert_corr_to_cov(corr_x[i], u_x[i][j])
528541
MC_data[:, j, :] = generate_sample_corr(
529-
MCsteps, x[i][j], u_x[i][j], corr_x[i], dtype=dtype
542+
MCsteps,
543+
x[i][j],
544+
u_x[i][j],
545+
corr_x[i],
546+
dtype=dtype,
547+
pdf_shape=pdf_shape,
548+
pdf_params=pdf_params,
530549
)
531550
else:
532551
raise NotImplementedError(

comet_maths/generate_sample/probability_density_function.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""describe class"""
2+
23
import warnings
34

45
"""___Built-In Modules___"""

comet_maths/interpolation/interpolation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Module for interpolation of data and enables propagation of uncertainties through the interpolation."""
1+
"""Module for interpolation of data and enables propagation of uncertainties through the interpolation."""
22

33
from typing import Union, Optional, List, Tuple
44

0 commit comments

Comments
 (0)