Make _make_animation public.
@@ -34,7 +34,7 @@ import numpy as np
# Internal imports.
# Make sure you have FFMpeg configured.
-def _make_animation(frames: Sequence[np.ndarray], frame_rate: float,
+def make_animation(frames: Sequence[np.ndarray], frame_rate: float,
figsize: Union[float, Tuple[int, int]]) -> anim.Animation:
"""Generates an animation from a stack of frames."""
@@ -113,7 +113,7 @@ class VideoWrapper(base.EnvironmentWrapper):
if self._counter % self._record_every == 0:
path = os.path.join(self._path,
f'{self._filename}_{self._counter:04d}.html')
- video = _make_animation(self._frames, self._frame_rate,
+ video = make_animation(self._frames, self._frame_rate,
self._figsize).to_html5_video()
with open(path, 'w') as f:
@@ -143,7 +143,7 @@ class VideoWrapper(base.EnvironmentWrapper):
def make_html_animation(self):
if self._frames:
- return _make_animation(self._frames, self._frame_rate,
+ return make_animation(self._frames, self._frame_rate,
self._figsize).to_html5_video()
else:
raise ValueError('make_html_animation should be called after running a '
