How to determine set of connected line from an array in python
I don't know of anything which provides the functionality you desire out of the box. If you have already written the logic, and it is just slow, have you considered Cython-ing your code. For simple typed looping operations you could get a significant speedup.
I have an array that looks something like:
[0  x1  0   0   y1   0   z1 
 0  0   x2  0   y2  0   z2  
 0  0   x3  0   0   y3  z3  
 0  0   x4  0   0   y4  z4 
 0  x5  0   0   0   y5  z5  
 0  0   0   0   y6   0   0] 
I need to determine set of connected line (i.e. line that connects to the points [x1,x2,x3..], [y1,y2,y3...], [z1,z2,z3..]) from the array and then need to find maximum value in each line i.e. max{x1,x2,x3,...}, max{y1,y2,y3..} etc.  i was trying to do nearest neighbor search using kdtree but it return the same array. I have array of the size (200 x 8000). is there any easier way to do this? Thx.