Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

norm added to the sphinx documentation #976

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

henriks76
Copy link

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

See #971

@coveralls
Copy link

coveralls commented Mar 3, 2024

Coverage Status

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

@bnavigator
Copy link
Contributor

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

Copy link
Contributor

@bnavigator bnavigator left a comment

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
Copy link
Contributor

bnavigator commented Mar 4, 2024

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
Copy link
Contributor

@henriks76
Copy link
Author

OK will use rounding this time.

…der Utility functions and conversions

* Use round in the docstring examples
Copy link
Contributor

@bnavigator bnavigator left a comment

Choose a reason for hiding this comment

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

LGTM

@bnavigator bnavigator merged commit 7a70be1 into python-control:main Mar 5, 2024
23 checks passed
@henriks76 henriks76 deleted the system-norms-doc branch March 5, 2024 09:47
@murrayrm murrayrm added this to the 0.10.0 milestone Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants