Yes, but to add a warning to an attribute, you have to use a property,
something like:
```
@property
def alphas_(self):
    if  np.size(np.atleast_1d(self.l1_ratio)) > 1:
        warnings.warn(...)
    return self._alphas_
```
But you should follow the others if they say it's fine not to warn!


On 15 January 2014 15:45, Manoj Kumar <notifications@github.com> wrote:

>  In sklearn/linear_model/coordinate_descent.py:
>
> > @@ -1200,6 +1292,12 @@ class ElasticNetCV(LinearModelCV, RegressorMixin):
> >          Mean square error for the test set on each fold, varying l1_ratio and
> >          alpha.
> >
> > +    ``alphas_`` : numpy array, shape = (n_alphas,) or (n_alphas*n_l1_ratio)
> > +        The grid of alphas used for fitting.
> > +        If provided, alphas_ is a 1-D array of shape n_alphas, else it is
> > +        of shape of n_alphas*n_l1_ratio since a grid of alphas is fit for
>
> @jnothman <https://github.com/jnothman> Thanks. How do I add a warning?
> I'm guessing from other places something like this,
>
> warnings.warn("The shape of attributes alphas_ has been changed from (n_alphas,) "
>                       "to (n_l1_ratio, n_alphas")
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/scikit-learn/scikit-learn/pull/2598/files#r8886549>
> .
>