No, makes no difference here, except for code clarity. `np.fill` seems
fastest; yet for this purpose, `as_strided(np.array(value), (size,), (0,))`
is even faster, but unreadable. And in this context it really doesn't
matter.


On Fri, Nov 8, 2013 at 2:14 PM, Manoj Kumar <notifications@github.com>wrote:

>  In sklearn/dummy.py:
>
> > @@ -146,6 +175,10 @@ def predict(self, X):
> >              elif self.strategy == "uniform":
> >                  ret = rs.randint(n_classes_[k], size=n_samples)
> >
> > +            elif self.strategy == "constant":
> > +                ret = np.ones(n_samples, dtype=int) * (
>
> I don't think it would make much of a difference here, but here it says
> that
> http://stackoverflow.com/questions/5891410/numpy-array-initialization-fill-with-identical-valuesnp.ones() is faster.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/scikit-learn/scikit-learn/pull/2566/files#r7518276>
> .
>