Skip to content

phase_plot ODE function signature is not compatible with solve_ivp and StateSpace.dynamics #968

Description

@FeldrinH

There seems to be some inconsistency with the ordering of parameters for ODE functions between phase_plot and StateSpace.dynamics. phase_plot expects a function with signature f(x, t), whereas StateSpace.dynamics and other functions that are meant to be used with scipy.integrate.solve_ivp provide a function with the signature f(t, x) (note that the order of arguments is different).

It would be nice if the order of arguments was consistent, so you could pass functions compatible with scipy.integrate.solve_ivp directly to phase_plot.

Activity

  1. sawyerbfuller commented on Mar 5, 2024

    @sawyerbfuller
    Contributor

    Yes I agree, phase_plot has the wrong parameter order, leftover from the previous convention. The docstring should also be updated to reference scipy's new integration scheme as well in scipy.integrate.solve_ivp.

    Please submit a pull request!

  2. FeldrinH commented on Mar 5, 2024

    @FeldrinH
    ContributorAuthor

    @murrayrm commented in #970 (comment) that he is rewriting parts of phase_plot, so it might not be worthwhile for an external contributor to do a pull request changing the old phase_plot code right now.

  3. linked a pull request that will close this issueReimplementation of 2D phase plots #980on Mar 28, 2024
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