Append Row(s) to a NumPy Record Array

前端 未结 3 588
忘了有多久
忘了有多久 2021-02-06 06:33

Is there a way to append a row to a NumPy rec.array()? For example,

x1=np.array([1,2,3,4])
x2=np.array([\'a\',\'dd\',\'xyz\',\'12\'])
x3=np.array([1.1,2,3,4])
r         


        
3条回答
  •  隐瞒了意图╮
    2021-02-06 06:51

    np.core.records.fromrecords(r.tolist()+[(5,'cc',43.)])
    

    Still it does split, this time by rows. Maybe better?

提交回复
热议问题