Skip to content

Commit

Permalink
[MOD] - commented out test_utils_002_RandomParameters
Browse files Browse the repository at this point in the history
  • Loading branch information
lpossner committed Jul 18, 2024
1 parent e396be6 commit d3a998b
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,35 +141,35 @@ def test_utils_001_testfunctions(self):

print("done!\n")

# def test_utils_002_RandomParameters(self):
# """
# Testing RandomParameters
# """
# global folder, plot
# test_name = 'test_utils_002_RandomParameters'
# print(test_name)

# parameters = OrderedDict()
# parameters["x1"] = pygpc.Beta(pdf_shape=[1, 1], pdf_limits=[0, 1])
# parameters["x2"] = pygpc.Beta(pdf_shape=[5, 5], pdf_limits=[0, 1])
# parameters["x3"] = pygpc.Beta(pdf_shape=[5, 2], pdf_limits=[0, 1])
# parameters["x4"] = pygpc.Beta(pdf_shape=[2, 5], pdf_limits=[0, 1])
# parameters["x5"] = pygpc.Beta(pdf_shape=[0.75, 0.75], pdf_limits=[0, 1])
# parameters["x6"] = pygpc.Norm(pdf_shape=[5, 1])

# if plot:
# import matplotlib.pyplot as plt
# fig = plt.figure()
# ax = parameters["x1"].plot_pdf()
# ax = parameters["x2"].plot_pdf()
# ax = parameters["x3"].plot_pdf()
# ax = parameters["x4"].plot_pdf()
# ax = parameters["x5"].plot_pdf()
# ax = parameters["x6"].plot_pdf()
# ax.legend(["x1", "x2", "x3", "x4", "x5", "x6"])
# ax.savefig(os.path.join(folder, test_name) + ".png")

# print("done!\n")
def test_utils_002_RandomParameters(self):
"""
Testing RandomParameters
"""
global folder, plot
test_name = 'test_utils_002_RandomParameters'
print(test_name)

parameters = OrderedDict()
parameters["x1"] = pygpc.Beta(pdf_shape=[1, 1], pdf_limits=[0, 1])
parameters["x2"] = pygpc.Beta(pdf_shape=[5, 5], pdf_limits=[0, 1])
parameters["x3"] = pygpc.Beta(pdf_shape=[5, 2], pdf_limits=[0, 1])
parameters["x4"] = pygpc.Beta(pdf_shape=[2, 5], pdf_limits=[0, 1])
parameters["x5"] = pygpc.Beta(pdf_shape=[0.75, 0.75], pdf_limits=[0, 1])
parameters["x6"] = pygpc.Norm(pdf_shape=[5, 1])

if plot:
import matplotlib.pyplot as plt
fig = plt.figure()
ax = parameters["x1"].plot_pdf()
ax = parameters["x2"].plot_pdf()
ax = parameters["x3"].plot_pdf()
ax = parameters["x4"].plot_pdf()
ax = parameters["x5"].plot_pdf()
ax = parameters["x6"].plot_pdf()
ax.legend(["x1", "x2", "x3", "x4", "x5", "x6"])
ax.savefig(os.path.join(folder, test_name) + ".png")

print("done!\n")

def test_utils_003_backends(self):
"""
Expand Down

0 comments on commit d3a998b

Please sign in to comment.