New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

profiling hyp1f1 #650

samuelstjean opened this Issue May 17, 2015 · 2 comments


None yet
1 participant

samuelstjean commented May 17, 2015

I started reviving the hyp1f1 from @matthew-brett so we can use it in the nlmeans function. Well, for starters I think I will simply precompute some values and use that, but for a local way of estimating the bias, we will need to have a fast version. So I translated everything to cython (still using gil though), and profiled it. Problem is, I have no idea what I am looking at actually and how to make it faster.

The html version shows a bunch of yellow lines, and the profiling shows numpy as the culprit. Anyone can shed light on how to make it useable? The cython file is here :


This comment has been minimized.


samuelstjean commented Jun 10, 2015

I think I have something working now, seems to work in most cases (well, not all the tests of the gsl pass, but it might be enough). It doesweird complex number warnings which I can't find where they are from though.


This comment has been minimized.


samuelstjean commented Jun 11, 2015

So, finally it's probably gonna be :

  1. try importing gsl hyp1f1 as opt dep
  2. if it's not available, try the cython version from mpmath
    2a. Where it fails to converge, use the standard mpmath symbolic version, thus adding a hard dep on mpmath for this version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment