Problem while using RandomWalkMetropolisHastings

hello
i’ve tried running the official examples on the RandomWalkMetropolisHastings and none of them would work. i kept getting this error :

TypeError: Wrong number or type of arguments for overloaded function 'new_RandomWalkMetropolisHastings'.
  Possible C/C++ prototypes are:
    OT::RandomWalkMetropolisHastings::RandomWalkMetropolisHastings()
    OT::RandomWalkMetropolisHastings::RandomWalkMetropolisHastings(OT::Distribution const &,OT::Distribution const &,OT::Sample const &,OT::Point const &,OT::RandomWalkMetropolisHastings::DistributionCollection const &)
    OT::RandomWalkMetropolisHastings::RandomWalkMetropolisHastings(OT::Distribution const &,OT::Distribution const &,OT::Function const &,OT::Sample const &,OT::Sample const &,OT::Point const &,OT::RandomWalkMetropolisHastings::DistributionCollection const &)
    OT::RandomWalkMetropolisHastings::RandomWalkMetropolisHastings(OT::RandomWalkMetropolisHastings const &)

python 3.8, ot 1.18

thanks,
sanaa

Hi Sanaa! The example you link to is from the doc of the master branch of OT. Look at the URL:

http ://openturns.github.io/openturns/master/user_manual/_generated/openturns.RandomWalkMetropolisHastings.html

So this page is showing how to use the future version of the RandomWalkMetropolisHastings class! See the README.rst file for more details about the different versions of the doc.

If you want to use the future version, you can install the nightly OT pip package:

Alternatively, you can simply wait for version 1.19. The release candidate is coming very soon.

Concerning RandomWalkMetropolisHastings, you can look forward to many improvements. Unfortunately, as you saw, they break backwards compatibility.