Skip to content

Commit 4dbcacc

Browse files
Include data generation in docstring code example (#5285)
1 parent 2c8f3c3 commit 4dbcacc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/source/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,12 @@ Fit your model using gradient-based MCMC algorithms like NUTS, using ADVI for fa
6767
```{code-block} python
6868
---
6969
---
70+
import numpy as np
7071
import pymc as pm
7172
72-
X, y = linear_training_data()
73+
X = np.random.normal(size=100)
74+
y = np.random.normal(X) * 1.2
75+
7376
with pm.Model() as linear_model:
7477
weights = pm.Normal("weights", mu=0, sigma=1)
7578
noise = pm.Gamma("noise", alpha=2, beta=1)

0 commit comments

Comments
 (0)