Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,5 @@ ENV/

# macOS temporary files
.DS_Store
*.png
*.pdf
1 change: 1 addition & 0 deletions comet_maths/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""comet_maths - Mathematical algorithms and tools to use within CoMet toolkit."""

from comet_maths.generate_sample.generate_sample import (
generate_sample,
generate_error_sample,
Expand Down
2 changes: 1 addition & 1 deletion comet_maths/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.7"
__version__ = "1.0.8"
25 changes: 22 additions & 3 deletions comet_maths/generate_sample/generate_sample.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""describe class"""

import copy
import warnings

Expand Down Expand Up @@ -512,21 +513,39 @@ def generate_sample_correlated(
if len(corr_x[i]) == len(u_x[i].ravel()):
# cov_x = cm.convert_corr_to_cov(corr_x[i], u_x[i])
MC_data = generate_sample_corr(
MCsteps, x[i], u_x[i], corr_x[i], dtype=dtype
MCsteps,
x[i],
u_x[i],
corr_x[i],
dtype=dtype,
pdf_shape=pdf_shape,
pdf_params=pdf_params,
)
elif len(corr_x[i]) == len(u_x[i]):
MC_data = np.zeros((MCsteps,) + (u_x[i].shape))
for j in range(len(u_x[i][0])):
# cov_x = cm.convert_corr_to_cov(corr_x[i], u_x[i][:, j])
MC_data[:, :, j] = generate_sample_corr(
MCsteps, x[i][:, j], u_x[i][:, j], corr_x[i], dtype=dtype
MCsteps,
x[i][:, j],
u_x[i][:, j],
corr_x[i],
dtype=dtype,
pdf_shape=pdf_shape,
pdf_params=pdf_params,
)
elif u_x[i].ndim > 1 and len(corr_x[i]) == len(u_x[i][0]):
MC_data = np.zeros((MCsteps,) + (u_x[i].shape))
for j in range(len(u_x[i][:, 0])):
# cov_x = cm.convert_corr_to_cov(corr_x[i], u_x[i][j])
MC_data[:, j, :] = generate_sample_corr(
MCsteps, x[i][j], u_x[i][j], corr_x[i], dtype=dtype
MCsteps,
x[i][j],
u_x[i][j],
corr_x[i],
dtype=dtype,
pdf_shape=pdf_shape,
pdf_params=pdf_params,
)
else:
raise NotImplementedError(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""describe class"""

import warnings

"""___Built-In Modules___"""
Expand Down
2 changes: 1 addition & 1 deletion comet_maths/interpolation/interpolation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Module for interpolation of data and enables propagation of uncertainties through the interpolation."""
"""Module for interpolation of data and enables propagation of uncertainties through the interpolation."""

from typing import Union, Optional, List, Tuple

Expand Down