Skip to content

Commit

Permalink
Merge pull request #107 from SciML/sol_dims
Browse files Browse the repository at this point in the history
fix dimensionality of sensitivity_solution
  • Loading branch information
ChrisRackauckas authored Oct 7, 2021
2 parents ccaba96 + 8a036f9 commit 8941525
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/solutions/nonlinear_solutions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ end

function sensitivity_solution(sol::AbstractNonlinearSolution,u)
T = eltype(eltype(u))
N = length((size(sol.prob.u0)...,))
N = ndims(u)

NonlinearSolution{T,N,typeof(u),typeof(sol.resid),
typeof(sol.prob),typeof(sol.alg),
Expand Down
2 changes: 1 addition & 1 deletion src/solutions/ode_solutions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ function solution_slice(sol::AbstractODESolution{T,N},I) where {T,N}

function sensitivity_solution(sol::AbstractODESolution,u,t)
T = eltype(eltype(u))
N = length((size(sol.prob.u0)..., length(u)))
N = length((size(u)..., length(u)))
interp = if typeof(sol.interp) <: LinearInterpolation
LinearInterpolation(t,u)
elseif typeof(sol.interp) <: ConstantInterpolation
Expand Down
3 changes: 2 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ using SafeTestsets
using Test
using SciMLBase

@test isempty(detect_ambiguities(SciMLBase))
# https://github.com/JuliaArrays/FillArrays.jl/pull/163
@test_broken isempty(detect_ambiguities(SciMLBase))

const GROUP = get(ENV, "GROUP", "All")
const is_APPVEYOR = ( Sys.iswindows() && haskey(ENV,"APPVEYOR") )
Expand Down

0 comments on commit 8941525

Please sign in to comment.