3 ms·
I would guess the Pythonic approach is slower due to the slicing operation, which creates a new shallow copy of the original array.
by panda88888 6y ago
I would guess the Pythonic approach is slower due to the slicing operation, which creates a new shallow copy of the original array.