I think ``` print(np.sort(Z)[-n:]) ``` or ``` Z.sort() print(Z[-n:]) ``` would be better than https://github.com/rougier/numpy-100/blob/916e1ecf9544719b49ece6fc135b089988b33058/100_Numpy_exercises_with_hints_with_solutions.md#L1084 because the first solution is simpler, and if it's ok to modify the array in place, the second solution is faster and uses less space.
I think
or
would be better than
numpy-100/100_Numpy_exercises_with_hints_with_solutions.md
Line 1084 in 916e1ec
because the first solution is simpler, and if it's ok to modify the array in place, the second solution is faster and uses less space.