質問編集履歴
1
markdown方式に変更
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
TypeError: a bytes-like object is required, not 'str'
|
|
88
88
|
|
|
89
89
|
### 該当のソースコード
|
|
90
|
+
```Python
|
|
90
91
|
|
|
91
92
|
import numpy as np
|
|
92
93
|
import matplotlib.pyplot as plt
|
|
@@ -108,6 +109,7 @@
|
|
|
108
109
|
|
|
109
110
|
def animate(i):
|
|
110
111
|
patch.set_data(frames[i])
|
|
112
|
+
|
|
111
113
|
|
|
112
114
|
anim = animation.FuncAnimation(plt.gcf(), animate, frames = len(frames), interval=50)
|
|
113
115
|
anim.save('movie_cartpole.mp4') # 追記:動画の保存です
|
|
@@ -125,6 +127,7 @@
|
|
|
125
127
|
|
|
126
128
|
display_frames_as_gif(frames)
|
|
127
129
|
|
|
130
|
+
```
|
|
128
131
|
### 補足情報(FW/ツールのバージョンなど)
|
|
129
132
|
anacondaを使用
|
|
130
133
|
python 3.7.4
|