Skip to content

Commit 7eb6632

Browse files
authored
Updated Exception Message
Reduced long message line
1 parent 9851d0e commit 7eb6632

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stable_baselines3/common/policies.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ def scale_action(self, action: np.ndarray) -> np.ndarray:
410410
# discrete actions case
411411
scaled_action = np.subtract(action, self.action_space.start)
412412
else:
413-
raise AssertionError(f"Trying to scale an action using an action space that is not a Box() or Discrete(): {self.action_space}")
413+
raise NotImplementedError(f"Trying to scale an action using action space: {self.action_space}")
414414

415415
return scaled_action
416416

@@ -433,7 +433,7 @@ def unscale_action(self, scaled_action: np.ndarray) -> np.ndarray:
433433
# match discrete actions bounds
434434
unscaled_action = np.add(scaled_action, self.action_space.start)
435435
else:
436-
raise AssertionError(f"Trying to unscale an action using an action space that is not a Box() or Discrete(): {self.action_space}")
436+
raise NotImplementedError(f"Trying to unscale an action using action space: {self.action_space}")
437437

438438
return unscaled_action
439439

0 commit comments

Comments
 (0)