Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a minor typo #13

Merged
merged 1 commit into from
Aug 3, 2024
Merged
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
10 changes: 5 additions & 5 deletions pyDOE3/doe_gsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ def gsd(levels, reduction, n=1):

partitions = _make_partitions(levels, reduction)
latin_square = _make_latin_square(reduction)
ortogonal_arrays = _make_orthogonal_arrays(latin_square, len(levels))
orthogonal_arrays = _make_orthogonal_arrays(latin_square, len(levels))

try:
designs = [
_map_partitions_to_design(partitions, oa) - 1 for oa in ortogonal_arrays
_map_partitions_to_design(partitions, oa) - 1 for oa in orthogonal_arrays
]
except ValueError:
raise ValueError("reduction too large compared to factor levels")
Expand Down Expand Up @@ -174,17 +174,17 @@ def _make_orthogonal_arrays(latin_square, n_cols):
return A_matrices


def _map_partitions_to_design(partitions, ortogonal_array):
def _map_partitions_to_design(partitions, orthogonal_array):
"""
Map partitioned factor to final design using orthogonal-array produced
by augmenting latin square.
"""
assert (
len(partitions) == ortogonal_array.max() + 1 and ortogonal_array.min() == 0
len(partitions) == orthogonal_array.max() + 1 and orthogonal_array.min() == 0
), "Orthogonal array indexing does not match partition structure"

mappings = list()
for row in ortogonal_array:
for row in orthogonal_array:
if any(not partitions[p][factor] for factor, p in enumerate(row)):
continue

Expand Down
Loading