天天看点

np.zeros的问题&&python错误:TypeError: Cannot interpret ‘3‘ as a data type

跑模型的时候出现了类似的错误:

np.zeros的问题&&python错误:TypeError: Cannot interpret ‘3‘ as a data type

 错误:无法将3当作一个数据类型,那么我们可以知道肯定是缺少了参数,查看np.ones的参数如下:

np.zeros的问题&&python错误:TypeError: Cannot interpret ‘3‘ as a data type

 改为这样就可以了: c = np.ones((2,3,4))

下一篇: Linux安装Cacti