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

Compatibility issue with SciPy 1.0 #164

Closed
Assignees
murrayrm
Labels
Milestone
@jcwinkler

Description

@jcwinkler

The following snippet

importcontrolasctrlG=ctrl.tf(1, [1,1])t,y=ctrl.step_response(G)

executed under Python 3.5.4 withSciPy 1.0, NumPy 1.13.3 and python-control 0.7 andSlyCot NOT installed fails to run.

After investigation it turns out that the problem arrises in the filestatesp.py, function_convertToStateSpace line 641: python-control tries to solve the problem using SlyCot. Since SlyCot is not found, it falls back to theImportError handling in which the SciPy'slti is called:

lti_sys=lti(squeeze(sys.num),squeeze(sys.den))returnStateSpace(lti_sys.A,lti_sys.B,lti_sys.C,lti_sys.D,sys.dt)

In SciyPy versions PRIOR to 1.0 the lti_sys object had the attributes A, B, C, D. However, in SciPy 1.0 these attributes have been removed. Hence, the code fails to execute.

Possible workaround would be (runs using SciPy 0.19 and 1.0):

fromscipy.signalimporttf2ssA,B,C,D=tf2ss(squeeze(sys.num),squeeze(sys.den))returnStateSpace(A,B,C,D,sys.dt)

What do you think? Since many Windows user do not have Slycot available by default it would be nice to get this fixed.

Jan

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp