I'm following certain tutorials for science proposals in Python and I've encounter this way of using indexing:
import numpy as np
l=np.array([8,5,2,3])
print(l[:,None])
What this print returns is:
[[8]
[5]
[2]
[3]]
It is obvious what this code does and I find it very useful for my proposal but It would never have occurred to me using it because I don't understand what this slicing syntax is saying.
Anyone can explain me how this type of slicing works?
Thanks in advance.