I was trying to optimise a model with a "pulse" probability; after I type
pulse_model.optimize(method="TNC")
I encounter the following error
module 'scipy.linalg' has no attribute 'pinv2'
I suspected this is simply a version issue with python / scipy. I dug around a bit and it seems the newer versions of scipy (1.7.0 and later I believe) do not support "pinv2". For example see https://docs.scipy.org/doc/scipy/reference/generated/scipy.linalg.pinv.html .
Of course to fix this all one must do is go into /path/to/packages/momi/math_functions.py and change line 209 from:
return scipy.linalg.pinv2(hypergeom_mat(N, n))
to
return scipy.linalg.pinv(hypergeom_mat(N, n))
or even just use a different version of scipy (prior to 1.7.0 I believe).
Thought this would be good to report in case others find a similar problem.
Dear momi2 authors,
I was trying to optimise a model with a "pulse" probability; after I type
pulse_model.optimize(method="TNC")
I encounter the following errormodule 'scipy.linalg' has no attribute 'pinv2'
I suspected this is simply a version issue with python / scipy. I dug around a bit and it seems the newer versions of scipy (1.7.0 and later I believe) do not support "pinv2". For example see https://docs.scipy.org/doc/scipy/reference/generated/scipy.linalg.pinv.html .Of course to fix this all one must do is go into /path/to/packages/momi/math_functions.py and change line 209 from:
return scipy.linalg.pinv2(hypergeom_mat(N, n))
toreturn scipy.linalg.pinv(hypergeom_mat(N, n))
or even just use a different version of scipy (prior to 1.7.0 I believe).Thought this would be good to report in case others find a similar problem.