Skip to content

Commit 7cb1d21

Browse files
committed
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.
1 parent 54dcf7b commit 7cb1d21

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

doc/library-developers.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ And here's how it can be used:
120120
exec(f.read())
121121
122122
.. ipython:: python
123+
:okwarning:
123124
124125
from patsy import demo_data
125126
data = demo_data("x", "y", "a")

doc/quickstart.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ method attached, so we can pass them directly to a regression function
4343
like :func:`np.linalg.lstsq`:
4444

4545
.. ipython:: python
46+
:okwarning:
4647
4748
outcome, predictors = dmatrices("y ~ x1 + x2", data)
4849
betas = np.linalg.lstsq(predictors, outcome)[0].ravel()

0 commit comments

Comments
 (0)