I try to understand what happens with this code using ndarrays:
max_evecs = evecs[..., :, 0]
where evecs is of type ndarray. So far I know that ':' is a slicing operator, and '...' is a so called Ellipse. So far ':' means all elements and '...' refers to as many as needed. I investigated the arrays with shape:
>>> max_evecs.shape
(128, 128, 72)
>>> evecs.shape
(128, 128, 72, 3)
I could imagine that, it is tried to convert a 3D array into an array of triples (x,y,z). But I am not sure about that.
For those who care: its from the dipy software package: function quantize_evecs
inside https://github.com/nipy/dipy/blob/ff75b192f694cdb62cc11310159cdb652ce62073/dipy/reconst/dti.py line around 1663