code: def check(a, b, digits):
      
      a = np.array(a, dtype=np.float64)
      b = np.array(b, dtype=np.float64)
  
      if a.shape != b.shape or a.shape[-1] != 2:
          raise ValueError('ranges must be identical and (2,)!')
  
      # if input was single interval reshape it here
      is_1D = False
      if len(a.shape) == 1:
          a = a.reshape((-1, 2))
          b = b.reshape((-1, 2))
          is_1D = True
  
      # make sure ranges are sorted
      a.sort(axis=1)
      b.sort(axis=1)
  
      # compare in fixed point as integers
      a_int = (a * 10**digits).round().astype(np.int64)
      b_int = (b * 10**digits).round().astype(np.int64)
  
      return a, b, a_int, b_int, is_1D
docs: Check input ranges, convert them to vector form,
      and get a fixed precision integer version of them.
  
      Parameters
      --------------
      a : (2, ) or (2, n) float
        Start and end of a 1D interval
      b : (2, ) or (2, n) float
        Start and end of a 1D interval
      digits : int
        How many digits to consider
  
      Returns
      --------------
      a : (2, n) float
        Ranges as vector
      b : (2, n) float
        Ranges as vector
      a_int : (2, n) int64
        Ranges rounded to digits, as vector
      b_int : (2, n) int64
        Ranges rounded to digits, as vector
      is_1D : bool
        If True, input was single pair of ranges