title: Numpy trim_zeros in 2D or 3D
body: <p>How to remove leading / trailing zeros from a NumPy array? <a href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.trim_zeros.html" rel="noreferrer">Trim_zeros</a> works only for 1D.</p>