Skip to content

Commit

Permalink
Tell ipython directive to ignore deprecation warnings from numpy
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
njsmith committed Oct 28, 2018
1 parent 54dcf7b commit 7cb1d21
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/library-developers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
1 change: 1 addition & 0 deletions doc/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 7cb1d21

Please sign in to comment.