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

Sample code for ERA-OKID from UW is broken #847

Open
@RPellowski

Description

@RPellowski

What is the issue?

This code must have worked at one time but is now broken. Have no previous experience with it running correctly.

Two issues related to:

Notebook containing the broken code:

  • CH09_SEC03_ERA_OKID.ipynb

Steps to Reproduce

  1. Test on Python 3.10
  2. Run the notebook

Source changes to accommodate the failures

The following changes to the source were needed:
Issue 1. Slice assignment
Change
yFull[:,:,qi],t = impulse(sysFull,T=tspan,input=qi)
to
yFull[:,:,qi:qi+1],t = impulse(sysFull,T=tspan,input=qi)

Change
y1[:,:,qi],t1 = impulse(sysFull,np.arange(200),input=qi)
y2[:,:,qi],t2 = impulse(sysERA,np.arange(100),input=qi)
y3[:,:,qi],t3 = impulse(sysERAOKID,np.arange(100),input=qi)
to
y1[:,:,qi:qi+1],t1 = impulse(sysFull,np.arange(200),input=qi)
y2[:,:,qi:qi+1],t2 = impulse(sysERA,np.arange(100),input=qi)
y3[:,:,qi:qi+1],t3 = impulse(sysERAOKID,np.arange(100),input=qi)

Issue 2. Invalid np array shape
Change
yRandom = lsim(sysFull,uRandom,range(200))[0].T # Output
to
yRandom = lsim(sysFull,uRandom.T,range(200))[0].T # Output

Summary

Potential root causes could be due to changes in this library or in changes to Python or both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp