Let h
be my matrix
h=[[0,346,34,6,7,0,0,34634,6,0],[2352,205230,523,50,5023,502,350,0,0]]
and I want to delete all the zeros from h
.
So the result should be:
h=[[346,34,6,7,34634,6],[2352,205230,523,50,5023,502,350]]
I tried several different things from HERE and other questions but nothing seems to work for a matrix. Is there any nice solution to that?