int argmax(List<dynamic> X) { int idx = 0; int l = X.length; for (int i = 0; i < l; i++) { idx = X[i] > X[idx] ? i : idx; } return idx; }