def find_change_in_general_direction(curvature):
 curv_pos = (curvature > 0)
 split = []
 currently_pos = curv_pos[0]
 for (c, is_pos) in zip(range(curvature.shape[0]), curv_pos):
  if (is_pos != currently_pos):
   currently_pos = is_pos
   split.append(c)
 return split

def find_change_in_general_direction ( curvature ) : curv_pos = ( curvature > 0 ) split = [ ] currently_pos = curv_pos [ 0 ] for ( c , is_pos ) in zip ( range ( curvature . shape [ 0 ] ) , curv_pos ) : if ( is_pos != currently_pos ) : currently_pos = is_pos split . append ( c ) return split
return indecies of where the singn of curvature has flipped .