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

Proposal for multiplying a NumPy array by a scalarTransferFunction #1076

Closed
@sdahdah

Description

@sdahdah

Currently, multiplying a SISOTransferFunction object by a NumPy array results in a dimension error:

importcontrolimportnumpyasnptf=control.TransferFunction([1], [1,0])arr=np.array([    [1,0],    [2,1],])print(tf*arr)print(arr*tf)
ValueError: C = A * B: A has 1 column(s) (input(s)), but B has 2 row(s) (output(s)).

I think it would be convenient if output was a MIMOTransferFunction object of the array's dimension. So, for example,

G=control.TransferFunction(    [        [[1], [0]],        [[2], [1]],    ],    [        [[1,0], [1,0]],        [[1,0], [1,0]],    ],)

I would be happy to implement this and do a PR, but I want to make sure it's something the maintainers actually want. I would think all SISO systems (state-space, etc) should behave in the same way.

This appears to have been discussed in#459 , but I'm not sure what the conclusion was.

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