[SciPy-User] autocrop 2d array

Christian K. ckkart at hoc.net
Thu May 12 07:30:32 EDT 2011


Hi,

I need to strip 0-values from a ndarray, similar to the autocrop function in 
image manipulation, i.e. I need to find the 0<->any steps in the ndarray. I 
cannot think of a solution without looping but I am sure there must be one 
based on clever indexing. Any ideas?

Thanks in advnace, Christian





More information about the SciPy-User mailing list