2014-09-01 17:23 GMT+02:00 Alberto Torres <[email protected]>:
> I would like to print the coordinate descent coefficients at each iteration.
> So far I've identified the code and variable I want to print. In particular
> I want to print the variable w in function enet_coordinate_descent from
> cd_fast.pyx. The problem is I do not have any previous experience with
> Cython and, as far as I've read, you can not simply put a print or a write
> statement because you run into problems with the GIL. Anyone has any
> pointers on how to solve this problem? Thank you very much in advance.

with gil:
    print(x)

works when x is a Python datatype or something easily convertible to
one. For a array, use good old printf.

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to