python错误:TypeError: Cannot interpret ‘3‘ as a data type

下面错误:
python错误:TypeError: Cannot interpret ‘3‘ as a data type_第1张图片
错误:无法将3当作一个数据类型,那么我们可以知道肯定是缺少了参数,查看np.ones的参数如下:
python错误:TypeError: Cannot interpret ‘3‘ as a data type_第2张图片改为这样就可以了: c = np.ones((2,3,4))

你可能感兴趣的:(#,python报错,python)