@spiceErrorCheck<EOL>def orderi(array, ndim=None):
if ndim is None:<EOL><INDENT>ndim = ctypes.c_int(len(array))<EOL><DEDENT>else:<EOL><INDENT>ndim = ctypes.c_int(ndim)<EOL><DEDENT>array = stypes.toIntVector(array)<EOL>iorder = stypes.emptyIntVector(ndim)<EOL>libspice.orderi_c(array, ndim, iorder)<EOL>return stypes.cVectorToPython(iorder)<EOL>
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