mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-01 22:11:25 +00:00
Doc improvement: add comment describing what convolve does (#264)
This commit is contained in:
@@ -299,6 +299,7 @@ for episode in tqdm(range(n_episodes)):
|
||||
rolling_length = 500
|
||||
fig, axs = plt.subplots(ncols=3, figsize=(12, 5))
|
||||
axs[0].set_title("Episode rewards")
|
||||
# compute and assign a rolling average of the data to provide a smoother graph
|
||||
reward_moving_average = (
|
||||
np.convolve(
|
||||
np.array(env.return_queue).flatten(), np.ones(rolling_length), mode="valid"
|
||||
|
Reference in New Issue
Block a user