I think the scipy folks intend that numpy-like setting operations should
suffice for many cases (although be a bit slower than the technique you've
illustrated).

E.g. you can use:

X[i, nonzero] = data[nonzero]

to replace some lines of Lars' code.

One disadvantage of this approach is needing to know X.shape beforehand.


On 29 July 2014 22:36, Lars Buitinck <larsm...@gmail.com> wrote:

> 2014-07-29 14:13 GMT+02:00 Eustache DIEMERT <eusta...@diemert.fr>:
> >> No, but it's not that hard to write [1].
> >
> > Do people see any value in either including it in the docs or
> encapsulating
> > it into sklearn.datasets ?
>
> If it fits somewhere in the docs, +1 from me. I might offer this to
> the SciPy folks as well.
>
> I don't think CSV loading is within our problem domain. That should be
> solved in SciPy. (VW format is another matter, as it's ML specific.)
>
>
> ------------------------------------------------------------------------------
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls.
> Build a bridge from your legacy apps to the future.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to