docs: def orderi(array, ndim=None):
      """
      Determine the order of elements in an integer array.
  
      http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/orderi_c.html
  
      :param array: Input array.
      :type array: Array of ints
      :param ndim: Optional Length of input array
      :type ndim: int
      :return: Order vector for array.
      :rtype: array of ints
      """
      if ndim is None:
          ndim = ctypes.c_int(len(array))
      else:
          ndim = ctypes.c_int(ndim)
      array = stypes.toIntVector(array)
      iorder = stypes.emptyIntVector(ndim)
      libspice.orderi_c(array, ndim, iorder)
      return stypes.cVectorToPython(iorder)