Weird pymc3 bug

Viewed 43

I've encountered really weird bug in pymc3:

The following code works fine:

import pymc3 as pm
for amplitude in range(10):
    kernel = amplitude**2*pm.gp.cov.Matern52(1, ls = 0.5)

The following throws an error:

import pymc3 as pm
import numpy as np

for amplitude in np.arange(10):
    kernel = amplitude**2*pm.gp.cov.Matern52(1, ls = 0.5)

Output

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-191-254ac7914bea> in <module>
      1 for i in np.arange(10):
----> 2     k = i**2*pm.gp.cov.Matern52(1, ls = 0.5)

~/anaconda3/envs/pymc3_env/lib/python3.6/site-packages/pymc3/gp/cov.py in __array_wrap__(self, result)
     91         Required to allow radd/rmul by numpy arrays.
     92         """
---> 93         r, c = result.shape
     94         A = np.zeros((r, c))
     95         for i in range(r):

ValueError: not enough values to unpack (expected 2, got 0)

Any idea on what is going on? I'm really curious.

0 Answers
Related