python - iPython lprun not printing output -
python - iPython lprun not printing output -
i don't know what's going on here, thought inquire guys.
i installed ipython 3.1 on mac osx 10.10.2
in ipython tried function no results, here example:
in [21]: def rn(): ....: ix in range(0,100): print ix ....: in [22]: %lprun rn() 0 1 2 3 4 .... 98 99 timer unit: 1e-06 s
in type of situation i'm expecting normal cprofile type output, showing lines ran , how long each 1 took. doing wrong?!
thanks!
use -f
flag line line output:
%lprun -f rn rn()
output:
in [13]: %lprun -f rn rn() 0 1 2 3 4 5 ... 94 95 96 97 98 99 timer unit: 1e-06 s total time: 0.000933 s file: <ipython-input-4-00cddd5336b9> function: rn @ line 1 line # hits time per nail % time line contents ============================================================== 1 def rn(): 2 101 933 9.2 100.0 ix in range(0,100): print ix
python ipython
Comments
Post a Comment