Is there a "bounding box" function (slice with non-zero values) for a ndarray in NumPy? Is there a "bounding box" function (slice with non-zero values) for a ndarray in NumPy? python python