code: def check_index(i):
      
  
      i = asarray(i)
      if (i.ndim > 1) or (size(i) < 1):
          raise Exception("Index must be one-dimensional and non-singleton")
  
      return i
docs: Checks and parses an index spec, must be a one-dimensional array [i0, i1, ...]