Closed DanielHolleufer closed 3 months ago
Interesting that worked. It was always Array(sol)
Ahh, I was not aware that I wasn't using the standard way to get the solution. I tested Array(sol) and that does indeed work in both versions. Thank you for clarifying.
Describe the bug 🐞
In newer version of DifferentialEquations.jl and RecursiveArrayTools.jl I am unable to get the matrix whose columns correspond to the solution at certain time steps using
sol[:, :]
, wheresol
is the output ofsolve(ODEProblem)
. Instead it throws an AssertionError (written below). I am still able to get specific columns out withsol[:, 1]
orsol[:, end]
. I only get an error when trying to get the full matrixsol[:, :]
.Expected behavior
Here is an example that works in DifferentialEquations.jl v7.12.0 and RecursiveArrayTools.jl v3.10.0 on a Windows 11 PC with Julia 1.10.1.
The output is
Minimal Reproducible Example 👇
Running the same example again, this time with DifferentialEquations.jl v7.13.0 and RecursiveArrayTools.jl v3.10.1 on a MacOs 14.3.1 also with Julia 1.10.1 I get an
AssertionError
from RecursiveArrayTools.jlError & Stacktrace ⚠️
Environment (please complete the following information): Here is the environment info in the case where i get an
AssertionError
. Below all this, I provide equivalent info for when I get the expected output.using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
Environment info in which I get the expected behaviour:
Output of
using Pkg; Pkg.status()
Output of
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
Output of
versioninfo()
Additional context
The code that gives the
AssertionError
was added to RecursiveArrayTools.jl just a few days ago, but I do not know how DifferentialEquations.jl actually uses RecursiveArrayTools.jl, so I decided to post the problem here.