GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Allow signal names to be used for time/freq responses and subsystem indexing by murrayrm · Pull Request #1069 · python-control/python-control Conversation
|
|
coverage: 94.721% (+0.02%) from 94.697% |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Almost done with review; it will be done tomorrow. For now, I am sending minor style comments.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| def __array_finalize__(self, obj): | ||
| # See https://numpy.org/doc/stable/user/basics.subclassing.html | ||
| if obj is None: return |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| if obj is None: return | |
| if obj is None: | |
| return |
return should go on the next line to make it more obvious what is in the if-block. Also, this is consistent with PEP 8:
Compound statements (multiple statements on the same line) are generally discouraged
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The example in the NumPy docs has obj is None: return (on 1 line), but my style comment remains. I do not know why the example there has this 1-line style, but I suspect it is to keep examples short, which would also justify there being only 1 blank line after import in those examples.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| idx = idx[0] | ||
|
|
||
| # Convert int to slice so that numpy doesn't drop dimension | ||
| if isinstance(idx, int): idx = slice(idx, idx+1, 1) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| if isinstance(idx, int): idx = slice(idx, idx+1, 1) | |
| if isinstance(idx, int): | |
| idx = slice(idx, idx+1, 1) |
Similar to my other comment, statements should be on separate lines for clarity of style (as per PEP 8).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # | ||
| def _process_subsys_index(idx, sys_labels, slice_to_list=False): | ||
| if not isinstance(idx, (slice, list, int)): | ||
| raise TypeError(f"system indices must be integers, slices, or lists") |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This string does not need the f prefix, but OK to keep it if you anticipate expressions being added to it later.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| sys = ct.rss(4, 3, 3) | ||
| subsys = sys[key] | ||
|
|
||
| # Construct the system to be test |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| # Construct the system to be test | |
| # Construct the system to be tested |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| response(tranpose=True).input | ||
|
|
||
| See :meth:`TimeResponseData.__call__` for more information. | ||
| See :meth:`TimeResponseData.__call__` for more information. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| See :meth:`TimeResponseData.__call__` for more information. | |
| See :meth:`TimeResponseData.__call__` for more information. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| which will compute the step response for each input/output pair. See | ||
| :class:`TimeResponseData` for more details. | ||
|
|
||
| The input, output, and state elements of the response can be access using |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| The input, output, and state elements of the response can be access using | |
| The input, output, and state elements of the response can be accessed using |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Access to frequency response data is available via the attributes | ||
| ``omega``, ``magnitude``,` `phase``, and ``response``, where ``response`` | ||
| represents the complex value of the frequency response at each frequency. | ||
| The ``magnitude``,` `phase``, and ``response`` arrays can be indexed using |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| The ``magnitude``,` `phase``, and ``response`` arrays can be indexed using | |
| The ``magnitude``, ``phase``, and ``response`` arrays can be indexed using |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| `control.config.defaults['iosys.indexed_system_name_prefix']` and | ||
| `control.config.defaults['iosys.indexed_system_name_suffix']`. The default |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| `control.config.defaults['iosys.indexed_system_name_prefix']` and | |
| `control.config.defaults['iosys.indexed_system_name_suffix']`. The default | |
| ``control.config.defaults['iosys.indexed_system_name_prefix']`` and | |
| ``control.config.defaults['iosys.indexed_system_name_suffix']``. The default |
rst files built with Sphinx require double backtick (``) to render as in-line code.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Note: The `fresp` data member is stored as a NumPy array and cannot be | ||
| accessed with signal names. Use `response.response` to access the complex |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| Note: The `fresp` data member is stored as a NumPy array and cannot be | |
| accessed with signal names. Use `response.response` to access the complex | |
| Note: The ``fresp`` data member is stored as a NumPy array and cannot be | |
| accessed with signal names. Use ``response.response`` to access the complex |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| `response` object: `response.magnitude`, `response.phase`, and | ||
| `response.response` (for the complex response). For MIMO systems, these |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| `response` object: `response.magnitude`, `response.phase`, and | |
| `response.response` (for the complex response). For MIMO systems, these | |
| ``response`` object: ``response.magnitude``, ``response.phase``, and | |
| ``response.response`` (for the complex response). For MIMO systems, these |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.