Above all, sorry for my bad English.
I have this array t
:
array([[ 0, 1, 2, 0, 4, 5, 6, 7, 8, 9],
[ 0, 11, 0, 13, 0, 15, 0, 17, 18, 0]])
I would like to delete the columns where the value of second line is null. Here, I would like to delete the columns 0, 2, 4, 6 and 9, to obtain this array:
array([[ 1, 0, 5, 7, 8 ],
[ 11, 13, 15, 17, 18 ]])
I tried with np.sum()
but didn't succeed.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…