Fix AdaGrad test.
Fix n_nonzero method.