sanaaZ  
                
               
                 
              
                  
                    March 25, 2022,  4:39pm
                   
                   
              1 
               
             
            
              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:
  
  
    Experimental Python wheels built from the development version are available on a dedicated Python index. 
It can be used to try new features shipped in the next release or benefit from the latest bugfixes, 
but on the other side it can also contain new bugs and API breakages, use at your own risk. 
pip3 install --pre --extra-index-url https://pypi.anaconda.org/openturns-wheels-nightly/simple --upgrade --force-reinstall openturns
When reporting bugs with these, be sure to report the date and ver…
   
 
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.