Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect handling of matrix-shaped states #18

Open
ghennequin opened this issue Nov 12, 2020 · 0 comments
Open

incorrect handling of matrix-shaped states #18

ghennequin opened this issue Nov 12, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@ghennequin
Copy link
Member

This fails, despite what the README.md says about integration of matrices:

open Owl
open Owl_ode

let tspec = Types.(T1 { t0 = 0.; duration = 1.; dt = 1E-3 })
let solver = Owl_ode_sundials.cvode ~stiff:false ~relative_tol:0. ~abs_tol:1E-5
let n = 10
let batch_size = 3
let dx x _ = Mat.(neg x)
let x0 = Mat.gaussian batch_size n
let times, states = Ode.odeint solver dx x0 tspec ()

For reference, the README.md says:

We also support temporal integration of matrices. That is, cases in which the state x is a matrix of dimensions of dimensions NxM. By default, in the output, we flatten and stack the states vertically (i.e., ts has dimensions Tx1 and xs has dimensions TxNM.

Just logging this issue so I don't forget, will try to take a look later ─ probably a bug introduced in Dec 2019 with a commit called Arr integration.

@mseri mseri added the bug Something isn't working label Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants