docs: def uniqueStates(states,rates):
      """
      Returns unique states and sums up the corresponding rates.
      States should be a 2d numpy array with on each row a state, and rates a 1d numpy array with length equal to the number of rows in states.      
      
      This may be helpful in the transition function for summing up the rates of different transitions that lead to the same state            
      """        
      order     = np.lexsort(states.T)
      states    = states[order]
      diff      = np.ones(len(states), 'bool')
      diff[1:]  = (states[1:] != states[:-1]).any(-1)
      sums      = np.bincount(diff.cumsum() - 1, rates[order])
      return states[diff], sums