Python: adding index as new column to 2D array

后端 未结 0 1706
灰色年华
灰色年华 2021-01-16 08:41

Suppose I have np.array like below

dat = array([[ 0,  1,  0],
[ 1,  0,  0],
[0, 0, 1]]
)

What I want to do is that adding the (index of row +

相关标签:
回答
  • 消灭零回复
提交回复
热议问题