Skip to content

Commit

Permalink
Fixed another issue with the visualizer when the timestep is a np arr…
Browse files Browse the repository at this point in the history
…ay with a single element
  • Loading branch information
S-Dafarra committed Apr 19, 2024
1 parent 356acd2 commit 54540e6
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ def _visualize_multiple_states(
or _timestep_s.size == 1
):
single_step = _timestep_s if _timestep_s is not None else 0.0
if isinstance(single_step, np.ndarray):
single_step = single_step.item()
_timestep_s = [single_step] * len(states)

if len(_timestep_s) != len(states):
Expand Down

0 comments on commit 54540e6

Please sign in to comment.