Thanks a lot Robert for this very useful tool! I was wondering if there is a way to make it work with Cython code (see below) ?
Sincerely, Nicolas fib.pyx: @profile def fib(n): """Print the Fibonacci series up to n.""" a, b = 0, 1 while b < n: a, b = b, a + b test.py: import pyximport pyximport.install() import fib fib.fib(100) % python kernprof.py -vl test.py Wrote profile results to test.py.lprof Timer unit: 1e-06 s Traceback (most recent call last): File "kernprof.py", line 167, in <module> sys.exit(main(sys.argv)) File "kernprof.py", line 155, in main execfile(script_file, ns, ns) File "test.py", line 5, in <module> import fib File "/usr/lib/python2.5/site-packages/Cython-0.11.2-py2.5-linux-x86_64.egg/pyximport/pyximport.py", line 288, in load_module self.pyxbuild_dir) File "/usr/lib/python2.5/site-packages/Cython-0.11.2-py2.5-linux-x86_64.egg/pyximport/pyximport.py", line 154, in load_module raise ImportError("Building module failed: %s" % e) ImportError: Building module failed: 'builtin_function_or_method' object has no attribute '__dict__' On Thu, Feb 19, 2009 at 5:21 PM, Robert Kern <robert.k...@gmail.com> wrote: > http://pypi.python.org/pypi/line_profiler/ > http://packages.python.org/line_profiler/ > > This release fixes the "negative timings" issue on Windows. > > Future announcements will occur on python-announce. I just wanted to > make sure my earliest users here who ran into this bug are aware of > the fix. > > -- > Robert Kern > > "I have come to believe that the whole world is an enigma, a harmless > enigma that is made terrible by our own mad attempt to interpret it as > though it had an underlying truth." > -- Umberto Eco > _______________________________________________ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://projects.scipy.org/mailman/listinfo/numpy-discussion > -- Nicolas Pinto Ph.D. Candidate, Brain & Computer Sciences Massachusetts Institute of Technology, USA http://web.mit.edu/pinto
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion