I tried the following codes to get elements of "1 46 91 136".
import numpy as np
x0 = np.arange(0, 180)
y0=x0[1:45:180]
However, y0
is array([1])
.
I noticed someone use the following codes: z0=x0[0:91:90]
This results in array([0, 90])
. What is the meaning of using "91" which is larger that "90"?
The colon (:) is quite different to that in Matlab code. Would you please give me some suggestions?