Skip to content

Commit

Permalink
Run nan_to_num on quantiles (#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlashner authored Apr 12, 2024
1 parent c93ce6c commit 741215a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion socs/agents/pysmurf_controller/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ def publish_quantile_block(arr, name):
if np.isnan(arr).all():
return None
labels = [f'{name}_q{q}' for q in quantiles]
qs = [float(np.nanquantile(arr, q / 100)) for q in quantiles]
qs = [float(np.nan_to_num(np.nanquantile(arr, q / 100))) for q in quantiles]
block = {
k: q
for k, q in zip(labels, qs)
Expand Down

0 comments on commit 741215a

Please sign in to comment.