Skip to content

Give a more helpful error message if f returns an array with more than 1 dimension #6

@mattja

Description

@mattja

sdeint needs some tighter input validation, if people try to use a state vector y with shape (n,1) instead of (n,)
e.g. mattja/nsim#2

I see that scipy.integrate.odeint also refuses this kind of input. But it gives a proper error message:

RuntimeError: The array return by func must be one-dimensional, but got ndim=2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions