2013/3/26 abinash.panda.ece10 <abinash.panda.ec...@iitbhu.ac.in>:
>>>> X = np.array([2*val for val in y])
>>>> X.shape
> (100,)

The correct input format is, per the documentation

    X : numpy array or sparse matrix of shape [n_samples,n_features]

So that's

    X = np.array([[2*val] for val in y])

or

    X = np.atleast2d(2 * y).T

We haven't implemented special cases for univariate input.

-- 
Lars Buitinck
Scientific programmer, ILPS
University of Amsterdam

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to