Skip to content

Commit 6965ba5

Browse files
authored
replace broadcast
1 parent 564e5ed commit 6965ba5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/build_function.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,17 @@ end
133133

134134
# Detect heterogeneous element types of "arrays of matrices/sparce matrices"
135135
function is_array_matrix(F)
136-
return isa(F, AbstractVector) && all(isa.(F, AbstractArray))
136+
return isa(F, AbstractVector) && all(x->isa(x, AbstractArray), F)
137137
end
138138
function is_array_sparse_matrix(F)
139-
return isa(F, AbstractVector) && all(isa.(F, AbstractSparseMatrix))
139+
return isa(F, AbstractVector) && all(x->isa(x, AbstractSparseMatrix), F)
140140
end
141141
# Detect heterogeneous element types of "arrays of arrays of matrices/sparce matrices"
142142
function is_array_array_matrix(F)
143-
return isa(F, AbstractVector) && all(isa.(F, AbstractArray{<:AbstractMatrix}))
143+
return isa(F, AbstractVector) && all(x->isa(x, AbstractArray{<:AbstractMatrix}), F)
144144
end
145145
function is_array_array_sparse_matrix(F)
146-
return isa(F, AbstractVector) && all(isa.(F, AbstractArray{<:AbstractSparseMatrix}))
146+
return isa(F, AbstractVector) && all(x->isa(x, AbstractArray{<:AbstractSparseMatrix}), F)
147147
end
148148

149149
function _build_function(target::JuliaTarget, rhss, args...;

0 commit comments

Comments
 (0)