gustaf.utils.connec.range_to_edges#

gustaf.utils.connec.range_to_edges(range_, closed=False, continuous=True)[source]#

Given range, for example (a, b), returns an edge sequence that sequentially connects indices. If int is given as range, it is considered as (0, value). Used to be called “closed/open_loop_index_train”.

Parameters:
  • range (list, tuple, or int)

  • closed (bool)

  • continuous (bool)

Returns:

edges

Return type:

(n, 2) np.ndarray