[SciPy-user] Breaking up an array of indices into contiguous/ strided chunks

Anand Patil anand.prabhakar.patil@gmail....
Mon Sep 15 10:55:36 CDT 2008

Hi all,
I have an array of indices that I want to use as a slice, but cvxopt sparse
matrices don't seem to take fancy slices so I need to take the slice
manually. If I just do it element-by-element in a for-loop it's extremely
slow. I know that the array of indices is in ascending order, but that's
all. Does anyone know an easy way to break it up into strided chunks that
are as big as possible?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20080915/4e895674/attachment.html 

More information about the SciPy-user mailing list