Shuffling non-zero elements of each row in an array - Python / NumPy

后端 未结 0 1599
闹比i
闹比i 2021-02-12 00:14

I have a an array that is relatively sparse, and I would like to go through each row and shuffle only the non-zero elements.

Example Input:

[2,3,1,0]
[0,         


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