def fastsort(a):
<EOL>it = np.argsort(a)<EOL>as_ = a[it]<EOL>return as_, it<EOL>
Sort an array and provide the argsort.

Parameters
----------
a : array_like
    Input array.

Returns
-------
fastsort : ndarray of type int
    sorted indices into the original array