3 ms·
It sucks for slicing though. In python (zero based), you can use 0:n to slice the entire array with a half-open interval. With one based, you have to either h
by gct 11y ago
It sucks for slicing though. In python (zero based), you can use 0:n to slice the entire array with a half-open interval. With one based, you have to either have a closed interval, so 1:n is the whole array (which sucks because what does an empty interval starting at 1 look like? 1:0?) Or you can have a half-open interval and index 1:n+1. I don't see what you saved yourself other than making things uglier.