From 7cb1d214dda60ee153eceee48c2f2758fd17f5aa Mon Sep 17 00:00:00 2001 From: "Nathaniel J. Smith" Date: Sat, 27 Oct 2018 20:06:23 -0700 Subject: [PATCH] Tell ipython directive to ignore deprecation warnings from numpy Apparently currently np.linalg.lstsq gives a warning if you don't pass rcond explicitly, and the ipython directive errors out if you get an unexpected warning. I don't care about any of this, so shut it up. --- doc/library-developers.rst | 1 + doc/quickstart.rst | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/library-developers.rst b/doc/library-developers.rst index a2e8f0b..478d302 100644 --- a/doc/library-developers.rst +++ b/doc/library-developers.rst @@ -120,6 +120,7 @@ And here's how it can be used: exec(f.read()) .. ipython:: python + :okwarning: from patsy import demo_data data = demo_data("x", "y", "a") diff --git a/doc/quickstart.rst b/doc/quickstart.rst index b290537..1ff1d02 100644 --- a/doc/quickstart.rst +++ b/doc/quickstart.rst @@ -43,6 +43,7 @@ method attached, so we can pass them directly to a regression function like :func:`np.linalg.lstsq`: .. ipython:: python + :okwarning: outcome, predictors = dmatrices("y ~ x1 + x2", data) betas = np.linalg.lstsq(predictors, outcome)[0].ravel()