Repository navigation
Error cleanly on complex EnsembleSummary; fix SplitFunction ODEProblem cache - #1463
Merged
ChrisRackauckas merged 1 commit intoJul 24, 2026
Conversation
…m cache - EnsembleSummary: detect complex state eltypes and throw ComplexEnsembleSummaryError instead of isless MethodError (DE SciML#632). Mean/var helpers remain available; quantiles/medians need a total order. - ODEProblem(SplitFunction, u0, tspan): allocate `_func_cache` for iip, matching SplitODEProblem, so bare construction no longer fails with ndims(::Type{Nothing}) on solve. - In-place SplitFunction call: throw a clear ArgumentError when `_func_cache` is still nothing. Co-Authored-By: Chris Rackauckas <[email protected]>
This was referenced Jul 23, 2026
Member
Author
CI babysit notePackage-level checks (Runic/Docs/Downgrade/Spell) are green; Downstream reds match the other SciMLBase drafts and master-side issues (Catalyst Local: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two small, independent fixes for long-standing footguns:
EnsembleSummaryon complex data (SciML/DifferentialEquations.jl#632): quantiles/medians needisless, which is undefined onComplex. Previously this failed deep insideStatistics.quantilewithMethodError: no method matching isless(::ComplexF64, ::ComplexF64). Now detects complex eltypes up front and throwsComplexEnsembleSummaryErrorwith workarounds (real/imag separately, magnitudes, or mean/var helpers). Semantics of "quantile on ℂ" are deliberately not invented — clean error matches SciML style (ComplexSupportError, etc.).ODEProblem(SplitFunction(f1!, f2!), u0, tspan)for iip:SplitODEProblemallocates_func_cachefromu0, but bareODEProblem(sf, u0, tspan)did not, sof(du,u,p,t)calledget_tmp(nothing, du)→ndims(::Type{Nothing}). Mirror theSplitODEProblemcache allocation on the bareODEProblempath, and throw a clearArgumentErrorif an iipSplitFunctionis evaluated without a cache.This PR should be ignored until reviewed by @ChrisRackauckas.
Tests
test/ensemble_tests.jl: complex ensemble rejects withComplexEnsembleSummaryError; mean/var still workstest/problem_building_test.jl: bare iipODEProblem(SplitFunction, …)allocates cache and evaluates; bare call without cache errors; oop path unchangedsolve(ODEProblem(SplitFunction(f1!,f2!), u0, tspan), Tsit5())→ Success; complexEnsembleSummarythrows the new errorRecommendation notes (not in this PR)
save_idxs(DE Accumulation for ODEProblem #1036): feature request only;SavedSubsystemalready rejects observed symbols by designgetsymsexists for plotting only)NonNumberEltypeError; closedCo-Authored-By: Chris Rackauckas [email protected]