Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BUG: s/empty/zeros in plot_lasso_bic_aic.py

  • Loading branch information...
commit 6cd32e0976e2a2e0bccf9eb4acafa003a4313095 1 parent d3502b0
Alexandre Gramfort agramfort authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  examples/linear_model/plot_lasso_bic_aic.py
2  examples/linear_model/plot_lasso_bic_aic.py
View
@@ -48,7 +48,7 @@
R = y[:, np.newaxis] - np.dot(X, coefs) # residuals
mse = np.sum(R ** 2, axis=0) # MSE ie. mean square error
-df = np.empty(coefs.shape[1], dtype=np.int) # Degrees of freedom
+df = np.zeros(coefs.shape[1], dtype=np.int) # Degrees of freedom
for k, coef in enumerate(coefs.T):
mask = coef != 0
if not np.any(mask):
Please sign in to comment.
Something went wrong with that request. Please try again.