original_docstring: 
      Circularly alias the numeric value x into the range [lower,upper).
  
      Valid for cyclic quantities like orientations or hues.
      
docstring: Circularly alias the numeric value x into the range [lower,upper).
  Valid for cyclic quantities like orientations or hues.
docstring_tokens: Circularly alias the numeric value x into the range [ lower upper ) . Valid for cyclic quantities like orientations or hues .
code: def wrap(lower, upper, x):
      """
      Circularly alias the numeric value x into the range [lower,upper).
  
      Valid for cyclic quantities like orientations or hues.
      """
      #I have no idea how I came up with this algorithm; it should be simplified.
      #
      # Note that Python's % operator works on floats and arrays;
      # usually one can simply use that instead.  E.g. to wrap array or
      # scalar x into 0,2*pi, just use "x % (2*pi)".
      range_=upper-lower
      return lower + np.fmod(x-lower + 2*range_*(1-np.floor(x/(2*range_))), range_)
code_tokens: def wrap ( lower , upper , x ) : range_ = upper - lower return lower + np . fmod ( x - lower + 2 * range_ * ( 1 - np . floor ( x / ( 2 * range_ ) ) ) , range_ )
short_docstring: Circularly alias the numeric value x into the range [lower,upper).
short_docstring_tokens: Circularly alias the numeric value x into the range [ lower upper ) .
comment: """
      Circularly alias the numeric value x into the range [lower,upper).
  
      Valid for cyclic quantities like orientations or hues.
      """$SEP$#I have no idea how I came up with this algorithm; it should be simplified.$SEP$#$SEP$# Note that Python's % operator works on floats and arrays;$SEP$# usually one can simply use that instead.  E.g. to wrap array or$SEP$# scalar x into 0,2*pi, just use "x % (2*pi)".