Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixes for SciPy 1.0 compatibility#170

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
murrayrm merged 1 commit intopython-control:masterfrommurrayrm:fix_scipy-1.0
Jan 2, 2018

Conversation

murrayrm
Copy link
Member

This PR fixes the SciPy 1.0 compatibility issues raised in issue#164. There are two main changes:

  • Updatedstatesp.py andxferfcn.py to use the new forms of thescipy.signal library, for which thelti class no longer has accessors fornum,den, etc. The fix is to directly call thess2tf andtf2ss functions.

  • Also had to add a check for scalars that are of anumpy data type, specifically forint64. Prior to Python 3, checking againstint worked correctly, but this is no longer the case. As a fix, I added checks throughout the library againstnumpy.number, which captures all scalar data types innumpy.

I also checked (manually) to insure that this version works againstscipy-0.19.0, which should mean it is OK for backward compatibility (this can be checked with PR#169 is merged).

@@ -221,18 +222,18 @@ def feedback(sys1, sys2=1, sign=-1):
"""

# Check for correct input types.
if not isinstance(sys1, (int, float, complex, tf.TransferFunction,
ss.StateSpace, frd.FRD)):
if not isinstance(sys1, (int, float, complex, np.number,
Copy link
Contributor

@roryyorkeroryyorkeDec 30, 2017
edited
Loading

Choose a reason for hiding this comment

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

I'm struggling to find docs on numpy.number; it has a__doc__ string, but no entry, e.g., here:https://docs.scipy.org/doc/numpy-1.13.0/genindex.html . This use seems reasonable, just not sure how standard it is.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

@murrayrmmurrayrm merged commitc4f1c34 intopython-control:masterJan 2, 2018
@murrayrmmurrayrm deleted the fix_scipy-1.0 branchJanuary 2, 2018 16:07
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@roryyorkeroryyorkeroryyorke left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
0.8.0
Development

Successfully merging this pull request may close these issues.

2 participants
@murrayrm@roryyorke

[8]ページ先頭

©2009-2025 Movatter.jp