We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3581344 commit cb68264Copy full SHA for cb68264
src/sas/sascalc/shape2sas/PluginGenerator.py
@@ -53,17 +53,17 @@ def format_parameter_list_of_list_dimension(par: list[list[str | float]]) -> str
53
"""
54
def format_parameter(p):
55
if isinstance(p, str):
56
- return f"min(abs({p}), 1)"
+ return f"max({p}, 1)"
57
elif isinstance(p, (int, float)):
58
if p < 0:
59
raise ValueError(f"PluginGenerator: Got value {p}, but dimensional scalars cannot be negative!")
60
return str(p)
61
else:
62
63
-
+
64
def format_sublist(sub_par):
65
return ", ".join(format_parameter(p) for p in sub_par)
66
67
formatted_sublists = [format_sublist(sub_par) for sub_par in par]
68
return f"[[{'],['.join(formatted_sublists)}]]"
69
0 commit comments