norm added to the sphinx documentation by henriks76 · Pull Request #976 · python-control/python-control

@henriks76

Added norm to the function reference in the sphinx documentation under Utility functions and conversions.

See #971

@coveralls

Coverage Status

coverage: 94.422%. remained the same
when pulling 6828c67 on henriks76:system-norms-doc
into e1e33e4 on python-control:main.

@bnavigator

**********************************************************************
File "../control/sysnorm.py", line ?, in default
Failed example:
    ct.norm(Gc, 'inf', tol=1e-11, method='scipy')
Expected:
    1.000000000007276
Got:
    0.999999999992724
*********************************************************************

bnavigator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to fix the tolerance in the docstring example

@bnavigator

Document: generated/control.norm
--------------------------------
**********************************************************************
File "../control/sysnorm.py", line ?, in default
Failed example:
    ct.norm(Gc, 'inf', tol=1e-4, method='scipy')
Expected:
    1.00006103515625
Got:
    0.99993896484375
**********************************************************************
1 items had failures:
   1 of   3 in default
3 tests in 1 items.
2 passed and 1 failed.
***Test Failed*** 1 failures.

You won't get any futher by setting the example to 0.99993896484375. Different platform yield different values. Probably best to round the output:

https://docs.python.org/3/library/doctest.html#warnings

@bnavigator

@henriks76

OK will use rounding this time.

…der Utility functions and conversions

* Use round in the docstring examples

bnavigator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM