Looking for help: error occured in simple linear model example – Questions

Thanks for your attention.

Codes :
import os
import numpy as np
import pandas as pd
import xarray as xr
import pymc3 as pm
import bambi

import matplotlib.pyplot as plt
import arviz as az
import theano
from numpy.random import default_rng

%matplotlib inline
%config InlineBackend.figure_format = ‘retina’

RANDOM_SEED = 8927
rng = default_rng(RANDOM_SEED)
az.style.use(“arviz-darkgrid”)

size = 50
true_intercept = 1
true_slope = 2
x = np.linspace(0, 1, size)
y = true_intercept + x * true_slope + rng.normal(scale=0.5, size=size)
data = pd.DataFrame({“x”: x, “y”: y})
model = bambi.Model(“y~x”, data)
fitted = model.fit(draws=1000) # error occured here.

====end of codes =======

And I found that after changing to “fitted = model.fit(draws=1000, cores=1)”, the error disappeared.

Read more here: Source link