Skip to content

Commit 7ae1b8d

Browse files
committed
try to fix downstream catalyst failure
1 parent 6793f13 commit 7ae1b8d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/systems/diffeqs/sdesystem.jl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,18 @@ function Base.:(==)(sys1::SDESystem, sys2::SDESystem)
246246
end
247247

248248
function __num_isdiag_noise(mat)
249-
all(col -> count(!iszero, col) <= 1, eachcol(mat))
249+
for j in axes(mat, 2)
250+
nnz = 0
251+
for i in axes(mat, 1)
252+
if !isequal(mat[i, j], 0)
253+
nnz += 1
254+
end
255+
end
256+
if nnz > 1
257+
return false
258+
end
259+
end
260+
true
250261
end
251262
function __get_num_diag_noise(mat)
252263
vec(sum(mat; dims = 2))

0 commit comments

Comments
 (0)