Skip to content

Commit f172d14

Browse files
committed
black
1 parent cb28708 commit f172d14

File tree

4 files changed

+26
-7
lines changed

4 files changed

+26
-7
lines changed

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/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, pdf_shape=pdf_shape, pdf_params=pdf_params
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, pdf_shape=pdf_shape, pdf_params=pdf_params
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, pdf_shape=pdf_shape, pdf_params=pdf_params
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: 2 additions & 4 deletions
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

@@ -108,9 +108,7 @@ def interpolate_1d_along_example(
108108
plot_residuals=self.plot_residuals,
109109
)
110110

111-
def interpolate_1d(
112-
self, x_i: np.ndarray, y_i: np.ndarray, x: np.ndarray
113-
) -> Union[
111+
def interpolate_1d(self, x_i: np.ndarray, y_i: np.ndarray, x: np.ndarray) -> Union[
114112
np.ndarray,
115113
Tuple[np.ndarray, np.ndarray],
116114
Tuple[np.ndarray, np.ndarray, np.ndarray],

0 commit comments

Comments
 (0)