fixing implementation for PA and simplifying learning_rates.pxd