public static Array Sort(Array arr, out Array indices, uint dim = 0, bool isAscending = true) { IntPtr outPtr, indPtr; Internal.VERIFY(AFAlgorithm.af_sort_index(out outPtr, out indPtr, arr._ptr, dim, isAscending)); indices = new Array(indPtr); return(new Array(outPtr)); }