Skip to content

Commit 2518a7f

Browse files
Change to ArrayInterfaceCore
1 parent 1b98b86 commit 2518a7f

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version = "8.11.6"
55

66
[deps]
77
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
8-
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
8+
ArrayInterfaceCore = "30b0a656-2188-435a-8636-2ec0e6a096e2"
99
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
1010
ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
1111
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
@@ -45,7 +45,7 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
4545

4646
[compat]
4747
AbstractTrees = "0.3"
48-
ArrayInterface = "3.1.39, 4, 5"
48+
ArrayInterfaceCore = "0.1.1"
4949
Combinatorics = "1"
5050
ConstructionBase = "1"
5151
DataStructures = "0.17, 0.18"

src/ModelingToolkit.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ using DiffEqBase, SciMLBase, Reexport
88
using Distributed
99
using StaticArrays, LinearAlgebra, SparseArrays, LabelledArrays
1010
using InteractiveUtils
11-
using Latexify, Unitful, ArrayInterface
11+
using Latexify, Unitful, ArrayInterfaceCore
1212
using MacroTools
1313
@reexport using UnPack
1414
using Setfield, ConstructionBase

src/systems/diffeqs/abstractodesystem.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ function DiffEqBase.ODEFunction{iip}(sys::AbstractODESystem, dvs = states(sys),
389389
elseif u0 === nothing || M === I
390390
M
391391
else
392-
ArrayInterface.restructure(u0 .* u0',M)
392+
ArrayInterfaceCore.restructure(u0 .* u0',M)
393393
end
394394

395395
obs = observed(sys)
@@ -569,7 +569,7 @@ function ODEFunctionExpr{iip}(sys::AbstractODESystem, dvs = states(sys),
569569
elseif u0 === nothing || M === I
570570
M
571571
else
572-
ArrayInterface.restructure(u0 .* u0',M)
572+
ArrayInterfaceCore.restructure(u0 .* u0',M)
573573
end
574574

575575
jp_expr = sparse ? :(similar($(get_jac(sys)[]),Float64)) : :nothing

src/systems/diffeqs/modelingtoolkitize.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ function modelingtoolkitize(prob::DiffEqBase.ODEProblem; kwargs...)
1313

1414
_vars = define_vars(prob.u0,t)
1515

16-
vars = prob.u0 isa Number ? _vars : ArrayInterface.restructure(prob.u0,_vars)
16+
vars = prob.u0 isa Number ? _vars : ArrayInterfaceCore.restructure(prob.u0,_vars)
1717
params = if has_p
1818
_params = define_params(p)
19-
p isa Number ? _params[1] : (p isa Tuple || p isa NamedTuple ? _params : ArrayInterface.restructure(p,_params))
19+
p isa Number ? _params[1] : (p isa Tuple || p isa NamedTuple ? _params : ArrayInterfaceCore.restructure(p,_params))
2020
else
2121
[]
2222
end
@@ -41,7 +41,7 @@ function modelingtoolkitize(prob::DiffEqBase.ODEProblem; kwargs...)
4141
end
4242

4343
if DiffEqBase.isinplace(prob)
44-
rhs = ArrayInterface.restructure(prob.u0,similar(vars, Num))
44+
rhs = ArrayInterfaceCore.restructure(prob.u0,similar(vars, Num))
4545
prob.f(rhs, vars, params, t)
4646
else
4747
rhs = prob.f(vars, params, t)
@@ -119,10 +119,10 @@ function modelingtoolkitize(prob::DiffEqBase.SDEProblem; kwargs...)
119119

120120
_vars = define_vars(prob.u0,t)
121121

122-
vars = prob.u0 isa Number ? _vars : ArrayInterface.restructure(prob.u0,_vars)
122+
vars = prob.u0 isa Number ? _vars : ArrayInterfaceCore.restructure(prob.u0,_vars)
123123
params = if has_p
124124
_params = define_params(p)
125-
p isa Number ? _params[1] : (p isa Tuple || p isa NamedTuple ? _params : ArrayInterface.restructure(p,_params))
125+
p isa Number ? _params[1] : (p isa Tuple || p isa NamedTuple ? _params : ArrayInterfaceCore.restructure(p,_params))
126126
else
127127
[]
128128
end

src/systems/diffeqs/sdesystem.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ function DiffEqBase.SDEFunction{iip}(sys::SDESystem, dvs = states(sys), ps = par
244244
end
245245

246246
M = calculate_massmatrix(sys)
247-
_M = (u0 === nothing || M == I) ? M : ArrayInterface.restructure(u0 .* u0',M)
247+
_M = (u0 === nothing || M == I) ? M : ArrayInterfaceCore.restructure(u0 .* u0',M)
248248

249249
sts = states(sys)
250250
SDEFunction{iip}(f,g,
@@ -309,7 +309,7 @@ function SDEFunctionExpr{iip}(sys::SDESystem, dvs = states(sys),
309309

310310
M = calculate_massmatrix(sys)
311311

312-
_M = (u0 === nothing || M == I) ? M : ArrayInterface.restructure(u0 .* u0',M)
312+
_M = (u0 === nothing || M == I) ? M : ArrayInterfaceCore.restructure(u0 .* u0',M)
313313

314314
ex = quote
315315
f = $f

src/systems/nonlinear/modelingtoolkitize.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ function modelingtoolkitize(prob::NonlinearProblem; kwargs...)
99

1010
_vars = reshape([variable(:x, i) for i in eachindex(prob.u0)], size(prob.u0))
1111

12-
vars = prob.u0 isa Number ? _vars : ArrayInterface.restructure(prob.u0, _vars)
12+
vars = prob.u0 isa Number ? _vars : ArrayInterfaceCore.restructure(prob.u0, _vars)
1313
params = if has_p
1414
_params = define_params(p)
15-
p isa Number ? _params[1] : (p isa Tuple || p isa NamedTuple ? _params : ArrayInterface.restructure(p, _params))
15+
p isa Number ? _params[1] : (p isa Tuple || p isa NamedTuple ? _params : ArrayInterfaceCore.restructure(p, _params))
1616
else
1717
[]
1818
end
1919

2020
if DiffEqBase.isinplace(prob)
21-
rhs = ArrayInterface.restructure(prob.u0, similar(vars, Num))
21+
rhs = ArrayInterfaceCore.restructure(prob.u0, similar(vars, Num))
2222
prob.f(rhs, vars, params)
2323
else
2424
rhs = prob.f(vars, params)

0 commit comments

Comments
 (0)