Skip to content

Commit c11777e

Browse files
Suppress new scs warning from docs output (backport #1580) (#1581)
jupyter-sphinx causes the docs build to fail for any warning so we need to suppress warnings for the docs to build. I am not sure if there is something we should be doing in this specific warning's case. The warning text is: > `/.tox/docs/lib/python3.13/site-packages/scs/__init__.py:83: UserWarning: ` > `Converting A to a CSC (compressed sparse column) matrix; may take a while.` The code emitting the warning in scs has not changed recently but something else in the pipeline must have changed to generate a matrix differently than it did before.<hr>This is an automatic backport of pull request #1580 done by [Mergify](https://mergify.com). Co-authored-by: Will Shanks <willshanks@us.ibm.com>
1 parent 5fb87fc commit c11777e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/manuals/verification/state_tomography.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,16 @@ details). For example, if ``cvxpy`` is installed we can use the
127127
:func:`~.cvxpy_gaussian_lstsq` fitter, which allows constraining the fit to be
128128
PSD without requiring rescaling.
129129

130+
.. jupyter-execute::
131+
:hide-code:
132+
133+
import warnings
134+
# Hide warning from scs from output; is there a way to avoid the warning?
135+
# Full warning line:
136+
# /.tox/docs/lib/python3.13/site-packages/scs/__init__.py:83: UserWarning:
137+
# Converting A to a CSC (compressed sparse column) matrix; may take a while.
138+
warnings.filterwarnings("ignore", module=r"scs", message="Converting A to a CSC")
139+
130140
.. jupyter-execute::
131141

132142
try:

0 commit comments

Comments
 (0)