SheffieldML / GPy

Gaussian processes framework in python
BSD 3-Clause "New" or "Revised" License
2.04k stars 562 forks source link

InverseGamma prior broken #502

Open 1Reinier opened 7 years ago

1Reinier commented 7 years ago

Calling GPy.priors.InverseGamma(1e-3, 1e-3) gives the following error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-23-49ffb5989b64> in <module>()
----> 1 GPy.priors.InverseGamma(1e-3, 1e-3)

/home/reinier/anaconda3/lib/python3.6/site-packages/GPy/core/parameterization/priors.py in __new__(cls, a, b)
    346                 if instance().a == a and instance().b == b:
    347                     return instance()
--> 348         o = super(Prior, cls).__new__(cls, a, b)
    349         cls._instances.append(weakref.ref(o))
    350         return cls._instances[-1]()

TypeError: object() takes no parameters
1Reinier commented 7 years ago

Probably this is because InvGamma inherits from Gamma

cwlgadd commented 7 years ago

I get the same error running old code which ran fine using python 2.7, after switching to python 3.6.1 and now using GPy's latest release. Has the use of this class changed?

OwenThomas commented 6 years ago

Hello! A bump for this issue, which I am also experiencing.

BrunoKM commented 3 years ago

Hi, another bump for this issue, which is still occurring :)