Is there an efficient and/or built in function to remove the all-zero rows of a 2d array? I am looking at numpy documentation but I have not found it.
2 Answers
4
votes
-1
votes
You can use the built-in function numpy.nonzero.
http://docs.scipy.org/doc/numpy/reference/generated/numpy.nonzero.html