[Numpy-discussion] trim_zeros in more than one dimension?

Andreas Hilboll lists@hilboll...
Tue Apr 20 08:03:47 CDT 2010

Hi there,

is there an easy way to do something like trim_zeros() does, but for a
n-dimensional array? I have a 2d array with only zeros in the first and
last rows and columns, and would like to trim this array to only the
non-zero part ...



More information about the NumPy-Discussion mailing list