获取以下错误..TypeError:在python中使用2D numpy数组时无法理解数据类型

2024-03-28 10:45:45 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用以下代码:

import numpy as np
a = np.array([1,2], [3,4])
print(a)

执行时,我收到以下错误:

^{pr2}$

这个错误的原因是什么?在


Tags: 代码importnumpyas错误np原因array