Skip to content

Commit cb68264

Browse files
committed
fixed minor plugin gen issue
1 parent 3581344 commit cb68264

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sas/sascalc/shape2sas/PluginGenerator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,17 @@ def format_parameter_list_of_list_dimension(par: list[list[str | float]]) -> str
5353
"""
5454
def format_parameter(p):
5555
if isinstance(p, str):
56-
return f"min(abs({p}), 1)"
56+
return f"max({p}, 1)"
5757
elif isinstance(p, (int, float)):
5858
if p < 0:
5959
raise ValueError(f"PluginGenerator: Got value {p}, but dimensional scalars cannot be negative!")
6060
return str(p)
6161
else:
6262
return str(p)
63-
63+
6464
def format_sublist(sub_par):
6565
return ", ".join(format_parameter(p) for p in sub_par)
66-
66+
6767
formatted_sublists = [format_sublist(sub_par) for sub_par in par]
6868
return f"[[{'],['.join(formatted_sublists)}]]"
6969

0 commit comments

Comments
 (0)