If I understand correctly, alpha is a (1, 1) array that is a slice to alphas. alphas is never updated as far as I can see, only alpha.
I am not sure why it is done this way.