#以第一列为字典名,其他列为值
a=np.random.randint(2,10,(6,3))
b={}
for i in range(len(a)):
c={a[i,0]:a[i,1:3]}
b.update(c)
#列表合并更新
a1=np.random.randint(10,15,(3,3))
b1={}
for i in range(len(a1)):
c1={a1[i,0]:a1[i,1:3]}
b.update(c1)
#以第一列为字典名,其他列为值
a=np.random.randint(2,10,(6,3))
b={}
for i in range(len(a)):
c={a[i,0]:a[i,1:3]}
b.update(c)
#列表合并更新
a1=np.random.randint(10,15,(3,3))
b1={}
for i in range(len(a1)):
c1={a1[i,0]:a1[i,1:3]}
b.update(c1)