@np.deprecate(message='scipy.stats.fastsort is deprecated in scipy 0.16.0')
def fastsort(a):
 it = np.argsort(a)
 as_ = a[it]
 return (as_, it)

@ np . deprecate ( message = 'scipy.stats.fastsort is deprecated in scipy 0.16.0' ) def fastsort ( a ) : it = np . argsort ( a ) as_ = a [ it ] return ( as_ , it )
sort an array and provide the argsort .