Skip to content

Commit 46ed095

Browse files
committed
Python2 compatibility returned
1 parent 0c5598f commit 46ed095

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pymultinest/run.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,10 @@ def Loglike(cube, ndim, nparams, lnew):
209209
# check if lnew is supported by user function
210210
nargs = 3
211211
try:
212-
nargs = len(inspect.getfullargspec(LogLikelihood).args) - inspect.ismethod(LogLikelihood)
212+
if sys.version_info[0] == 3:
213+
nargs = len(inspect.getfullargspec(LogLikelihood).args) - inspect.ismethod(LogLikelihood)
214+
else:
215+
nargs = len(inspect.getargspec(LogLikelihood).args) - inspect.ismethod(LogLikelihood)
213216
except:
214217
pass
215218

0 commit comments

Comments
 (0)