GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — norm added to the sphinx documentation by henriks76 · Pull Request #976 · python-control/python-control

Conversation

@henriks76

@henriks76 henriks76 commented Mar 3, 2024

Copy link
Copy Markdown

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

See #971

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@coveralls

coveralls commented Mar 3, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Coverage Status

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnavigator

bnavigator commented Mar 4, 2024

Copy link
Copy Markdown
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
*********************************************************************
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnavigator bnavigator added the enhancement label Mar 4, 2024
bnavigator
bnavigator requested changes Mar 4, 2024
View reviewed changes

@bnavigator bnavigator left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this 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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@henriks76
henriks76 force-pushed the system-norms-doc branch from c5f03de to 47a393e Compare March 4, 2024 16:33
@bnavigator

bnavigator commented Mar 4, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnavigator

bnavigator commented Mar 4, 2024

Copy link
Copy Markdown
Contributor

Or go to pytest-doctestplus: https://github.com/scientific-python/pytest-doctestplus?tab=readme-ov-file#floating-point-comparison

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@henriks76

henriks76 commented Mar 5, 2024

Copy link
Copy Markdown
Author

OK will use rounding this time.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Henrik Sandberg
* Added norm to the function reference in the sphinx documentation un…
6828c67
…der Utility functions and conversions

* Use round in the docstring examples
@henriks76
henriks76 force-pushed the system-norms-doc branch from 47a393e to 6828c67 Compare March 5, 2024 09:09
bnavigator
bnavigator approved these changes Mar 5, 2024
View reviewed changes

@bnavigator bnavigator left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

KybernetikJo reacted with hooray emoji
All reactions
  • 🎉 1 reaction
@bnavigator
bnavigator merged commit 7a70be1 into python-control:main Mar 5, 2024
@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

Reviewers

@bnavigator bnavigator bnavigator approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

enhancement

Projects

None yet

Milestone

0.10.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@henriks76 @coveralls @bnavigator @murrayrm
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.