Skip to content

Commit

Permalink
Python2 compatibility returned
Browse files Browse the repository at this point in the history
  • Loading branch information
thjsal committed Feb 8, 2023
1 parent 0c5598f commit 46ed095
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pymultinest/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,10 @@ def Loglike(cube, ndim, nparams, lnew):
# check if lnew is supported by user function
nargs = 3
try:
nargs = len(inspect.getfullargspec(LogLikelihood).args) - inspect.ismethod(LogLikelihood)
if sys.version_info[0] == 3:
nargs = len(inspect.getfullargspec(LogLikelihood).args) - inspect.ismethod(LogLikelihood)
else:
nargs = len(inspect.getargspec(LogLikelihood).args) - inspect.ismethod(LogLikelihood)
except:
pass

Expand Down

0 comments on commit 46ed095

Please sign in to comment.