How to remove nth element in all numpy arrays in a numpy array?

后端 未结 1 995
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-19 00:05

Similar to this, I am curious how to remove specific elements from every numpy array in a numpy array. My data is given in form of X below. I think this should work:

1条回答
  •  北海茫月
    2021-01-19 00:34

    You need to apply np.delete along an axis. Please refer to the third example in the documentation.

    Y = np.delete(X, 1, axis=1)
    

    0 讨论(0)
提交回复
热议问题