Skip to content

Commit c755b35

Browse files
Merge pull request #2966 from MasonProtter/patch-3
Hotfix to avoid DataFrames.jl piracy
2 parents 874985c + 508a7df commit c755b35

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

src/systems/abstractsystem.jl

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,13 +1345,16 @@ function parameter_dependencies(sys::AbstractSystem)
13451345
pdeps = get_parameter_dependencies(sys)
13461346
systems = get_systems(sys)
13471347
# put pdeps after those of subsystems to maintain topological sorted order
1348-
return vcat(
1349-
reduce(vcat,
1350-
[map(eq -> namespace_equation(eq, s), parameter_dependencies(s))
1351-
for s in systems];
1352-
init = Equation[]),
1353-
pdeps
1354-
)
1348+
if isempty(systems)
1349+
return pdeps
1350+
else
1351+
return vcat(
1352+
reduce(vcat,
1353+
[map(eq -> namespace_equation(eq, s), parameter_dependencies(s))
1354+
for s in systems]),
1355+
pdeps
1356+
)
1357+
end
13551358
end
13561359

13571360
function full_parameters(sys::AbstractSystem)

src/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ function promote_to_concrete(vs; tofloat = true, use_union = true)
690690
C = Union{C, E}
691691
else
692692
C2 = promote_type(C, E)
693-
@assert C2==E || C2==C "`promote_to_concrete` can't make type $E uniform with $C"
693+
@assert C2 == E||C2 == C "`promote_to_concrete` can't make type $E uniform with $C"
694694
C = C2
695695
end
696696
end

0 commit comments

Comments
 (0)