GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — LinearIOSystems cannot be multiplied by a scalar/array · Issue #541 · python-control/python-control

LinearIOSystems cannot be multiplied by a scalar/array #541

New issue
Copy link
New issue
Copy link
Closed
Closed
LinearIOSystems cannot be multiplied by a scalar/array#541
Copy link

Description

@sawyerbfuller
sawyerbfuller
opened on Feb 11, 2021
Issue body actions

The following code causes a bug when it tries to raise an error:

import control as ct
import control.iosys as io
2*io.ss2io(ct.ss(1,1,1,1))

raise NotImplemented("Scalar multiplication not yet implemented")

This is because InputOutputSystems define various methods, e.g. __mul__ that override those in StateSpace and some are not implemented yet.

Options that come to mind if we want this to work better:

  1. Test for instances of StateSpace correctly and dispatch. This seems to be onerous and at odds with how inheritance ought to make things easier.
  2. In the __init__ method of LinearIOSystem, delete those methods
  3. move those operations to NonLinearIOSystem (and override as necessary in LinearIOSystem when it makes sense to create a new LinearICSystem)

Related: many of the methods like __mul__ don't act on self and other but rather sys1 and sys2. This might still work, but I think the first argument should be self according to Python convention.

Activity

  1. murrayrm commented on Feb 11, 2021

    @murrayrm
    murrayrm
    on Feb 11, 2021
    Member
    More actions

    See also issue #513, which has a long list of missing conversions.

  2. sawyerbfuller
    closed this as completedon Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.