Python报错:TypeError: Cannot interpret ‘4‘ as a data type

Python报错:

TypeError: Cannot interpret ‘4‘ as a data type

报错行:

self.observations = np.zeros(self.max_size, state_dim)

修改方法:
多维的应该加括号:

self.observations = np.zeros((self.max_size, state_dim))

你可能感兴趣的:(Python常见报错,Python,python,numpy,开发语言)