diff -Naur patsy-0.5.0.orig/doc/library-developers.rst patsy-0.5.0/doc/library-developers.rst
--- patsy-0.5.0.orig/doc/library-developers.rst 2015-11-09 06:05:25.000000000 +0100
+++ patsy-0.5.0/doc/library-developers.rst 2018-10-06 12:05:36.394522540 +0200
@@ -120,6 +120,7 @@
exec(f.read())
.. ipython:: python
+ :okwarning:
from patsy import demo_data
data = demo_data("x", "y", "a")
diff -Naur patsy-0.5.0/doc/quickstart.rst patsy-0.5.0.2/doc/quickstart.rst
--- patsy-0.5.0/doc/quickstart.rst 2014-04-29 02:16:03.000000000 +0200
+++ patsy-0.5.0.2/doc/quickstart.rst 2018-10-06 12:17:20.869923224 +0200
@@ -43,6 +43,7 @@
like :func:`np.linalg.lstsq`:
.. ipython:: python
+ :okwarning:
outcome, predictors = dmatrices("y ~ x1 + x2", data)
betas = np.linalg.lstsq(predictors, outcome)[0].ravel()
diff -Naur patsy-0.5.0/doc/spline-regression.rst patsy-0.5.0.2/doc/spline-regression.rst
--- patsy-0.5.0/doc/spline-regression.rst 2015-11-09 06:01:53.000000000 +0100
+++ patsy-0.5.0.2/doc/spline-regression.rst 2018-10-06 12:25:41.462326090 +0200
@@ -162,6 +162,7 @@
marginal spline bases patterns can be observed on the x and y contour projections:
.. ipython::
+ :okwarning:
In [10]: from matplotlib import cm
diff -Naur patsy-0.5.0/doc/stateful-transforms.rst patsy-0.5.0.2/doc/stateful-transforms.rst
--- patsy-0.5.0/doc/stateful-transforms.rst 2015-11-09 06:00:29.000000000 +0100
+++ patsy-0.5.0.2/doc/stateful-transforms.rst 2018-10-06 12:34:46.687480063 +0200
@@ -35,6 +35,7 @@
Now we can build a design matrix and see what we get:
.. ipython:: python
+ :okexcept:
mat = dmatrix("naive_center(x)", data)
mat
@@ -49,6 +50,7 @@
transformation, like so:
.. ipython:: python
+ :okexcept:
new_data = {"x": [5, 6, 7, 8]}
# Broken!
@@ -76,6 +78,7 @@
way:
.. ipython:: python
+ :okexcept:
fixed_mat = dmatrix("center(x)", data)
fixed_mat
@@ -83,6 +86,7 @@
But if we then feed in our new data, we also get out the correct result:
.. ipython:: python
+ :okexcept:
# Correct!
build_design_matrices([fixed_mat.design_info], new_data)[0]
@@ -97,6 +101,7 @@
just similar enough for you to miss the problem until it's too late.)
.. ipython:: python
+ :okexcept:
data_chunked = [{"x": data["x"][:2]},
{"x": data["x"][2:]}]
@@ -108,6 +113,7 @@
But if we use the proper stateful transform, this just works:
.. ipython:: python
+ :okexcept:
dinfo = incr_dbuilder("center(x)", lambda: iter(data_chunked))
# Correct!
@@ -133,6 +139,7 @@
for prediction as well:
.. ipython:: python
+ :okexcept:
# Correct!
build_design_matrices([dinfo], new_data)[0]