Skip to content

Commit

Permalink
monkey patch scipy to fix autograd
Browse files Browse the repository at this point in the history
  • Loading branch information
erikbern committed Jul 7, 2019
1 parent 194a3d1 commit 9c44cca
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions convoys/regression.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Monkey patching scipy to avoid issue with autograd
import scipy.misc
if not hasattr(scipy.misc, 'logsumexp'):
import scipy.special
scipy.misc.logsumexp = scipy.special.logsumexp

# Now, continue with the real stuff.
import autograd
from autograd_gamma import gammainc
import emcee
Expand Down

0 comments on commit 9c44cca

Please sign in to comment.