Skip to content

Commit

Permalink
Merge pull request #227 from thjsal/master
Browse files Browse the repository at this point in the history
Python2 compatibility returned
  • Loading branch information
JohannesBuchner authored Feb 8, 2023
2 parents 0c5598f + 46ed095 commit c8eba95
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 c8eba95

Please sign in to comment.