Skip to content

Commit

Permalink
Sanitise transformer keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
ruicoelhopedro committed May 6, 2024
1 parent 7e9ff65 commit 28bface
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions piglot/utils/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ def read(config: Dict[str, Any]) -> Transformer:
Transformer instance.
"""
return Transformer(
x_scale=config.get("x_scale", 1.0),
y_scale=config.get("y_scale", 1.0),
x_offset=config.get("x_offset", 0.0),
y_offset=config.get("y_offset", 0.0),
x_min=config.get("x_min", -np.inf),
x_max=config.get("x_max", np.inf),
x_scale=float(config.get("x_scale", 1.0)),
y_scale=float(config.get("y_scale", 1.0)),
x_offset=float(config.get("x_offset", 0.0)),
y_offset=float(config.get("y_offset", 0.0)),
x_min=float(config["x_min"]) if "x_min" in config else -np.inf,
x_max=float(config["x_max"]) if "x_max" in config else np.inf,
)


Expand Down

0 comments on commit 28bface

Please sign in to comment.