SciML / JumpProcesses.jl

Build and simulate jump equations like Gillespie simulations and jump diffusions with constant and state-dependent rates and mix with differential equations and scientific machine learning (SciML)
https://docs.sciml.ai/JumpProcesses/stable/
Other
140 stars 35 forks source link

Method ambiguities reported by Aqua #384

Open prbzrg opened 10 months ago

prbzrg commented 10 months ago

In Julia v1.10, I used Aqua to detect method ambiguities in my package https://github.com/impICNF/ContinuousNormalizingFlows.jl/issues/356 and some of its report were related to this package:

Ambiguity #17
Base.Broadcast.BroadcastStyle(::JumpProcesses.ExtendedJumpArrayStyle{UStyle, JumpUStyle}, ::Style) where {UStyle, JumpUStyle, Style<:BroadcastStyle} @ JumpProcesses ~/.julia/packages/JumpProcesses/HPjOl/src/extended_jump_array.jl:139
Base.Broadcast.BroadcastStyle(::S, ::Base.Broadcast.Unknown) where S<:BroadcastStyle @ Base.Broadcast broadcast.jl:133

Possible fix, define
  Base.Broadcast.BroadcastStyle(::S, ::Base.Broadcast.Unknown) where {UStyle, JumpUStyle, S<:JumpProcesses.ExtendedJumpArrayStyle{UStyle, JumpUStyle}}

I would appreciate your attention to this issue.

isaacsas commented 10 months ago

@ChrisRackauckas what should the suggested dispatch do? Is that a valid broadcast style combination that reuses the current corde, or should it just throw an error?

ChrisRackauckas commented 10 months ago

I don't know. It should probably just throw an error.