Skip to content

Commit 11c0263

Browse files
Merge pull request #141 from SciML/arrayinterface
update to ArrayInterface v7
2 parents 3f7dda5 + d618c8d commit 11c0263

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

Project.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ authors = ["Chris Rackauckas <[email protected]>"]
44
version = "1.13.0"
55

66
[deps]
7-
ArrayInterfaceCore = "30b0a656-2188-435a-8636-2ec0e6a096e2"
8-
ArrayInterfaceStaticArrays = "b0d46f97-bff5-4637-a19a-dd75974142cd"
9-
ArrayInterfaceStaticArraysCore = "dd5226c6-a4d4-4bc7-8575-46859f9c95b9"
7+
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
108
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
119
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
1210
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
@@ -16,9 +14,7 @@ PreallocationTools = "d236fae5-4411-538c-8e31-a6e3d9e00b46"
1614
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
1715

1816
[compat]
19-
ArrayInterfaceCore = "0.1.22"
20-
ArrayInterfaceStaticArrays = "0.1"
21-
ArrayInterfaceStaticArraysCore = "0.1.3"
17+
ArrayInterface = "7"
2218
ChainRulesCore = "1"
2319
ForwardDiff = "0.10.3"
2420
MacroTools = "0.5"

src/LabelledArrays.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module LabelledArrays
22

3-
using LinearAlgebra, StaticArrays, ArrayInterfaceCore
3+
using LinearAlgebra, StaticArrays, ArrayInterface
44
import RecursiveArrayTools, PreallocationTools, ForwardDiff
55

66
include("slarray.jl")
@@ -59,14 +59,14 @@ end
5959
Base.NamedTuple(x::Union{LArray, SLArray}) = NamedTuple{symnames(typeof(x))}(x.__x)
6060
@inline Base.reshape(a::SLArray, s::Size) = StaticArrays.similar_type(a, s)(Tuple(a))
6161

62-
function ArrayInterfaceCore.ismutable(::Type{<:LArray{T, N, D, Syms}}) where {T, N, D, Syms}
63-
ArrayInterfaceCore.ismutable(T)
62+
function ArrayInterface.ismutable(::Type{<:LArray{T, N, D, Syms}}) where {T, N, D, Syms}
63+
ArrayInterface.ismutable(T)
6464
end
65-
ArrayInterfaceCore.can_setindex(::Type{<:SLArray}) = false
65+
ArrayInterface.can_setindex(::Type{<:SLArray}) = false
6666

6767
lenfun(x) = length(x)
6868
lenfun(::Symbol) = 1
69-
function ArrayInterfaceCore.undefmatrix(x::LArray{T, N, D, Syms}) where {T, N, D, Syms}
69+
function ArrayInterface.undefmatrix(x::LArray{T, N, D, Syms}) where {T, N, D, Syms}
7070
n = sum(lenfun, Syms)
7171
similar(x.__x, n, n)
7272
end
@@ -78,7 +78,7 @@ function PreallocationTools.get_tmp(dc::PreallocationTools.DiffCache,
7878
if nelem > length(dc.dual_du)
7979
PreallocationTools.enlargedualcache!(dc, nelem)
8080
end
81-
_x = ArrayInterfaceCore.restructure(dc.du, reinterpret(T, view(dc.dual_du, 1:nelem)))
81+
_x = ArrayInterface.restructure(dc.du, reinterpret(T, view(dc.dual_du, 1:nelem)))
8282
LabelledArrays.LArray{T, N, D, Syms}(_x)
8383
end
8484

src/larray.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ function Base.convert(::Type{AbstractArray{T, N}},
149149
end
150150
Base.convert(::Type{AbstractArray{T, N}}, x::LArray{T, N}) where {T, N} = x
151151

152-
function ArrayInterfaceCore.restructure(x::LArray{T, N, D, Syms},
152+
function ArrayInterface.restructure(x::LArray{T, N, D, Syms},
153153
y::LArray{T2, N2, D2, Syms}) where {T, N, D, T2, N2,
154154
D2,
155155
Syms}

0 commit comments

Comments
 (0)