Skip to content

Commit 9e3fea0

Browse files
Merge pull request #124 from SciML/core
Use ArrayInterfaceCore
2 parents fdc2330 + a3a2789 commit 9e3fea0

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name = "LabelledArrays"
22
uuid = "2ee39098-c373-598a-b85f-a56591580800"
33
authors = ["Chris Rackauckas <[email protected]>"]
4-
version = "1.11.0"
4+
version = "1.11.1"
55

66
[deps]
7-
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
7+
ArrayInterfaceCore = "30b0a656-2188-435a-8636-2ec0e6a096e2"
88
ArrayInterfaceStaticArrays = "b0d46f97-bff5-4637-a19a-dd75974142cd"
99
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
1010
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
@@ -14,7 +14,7 @@ PreallocationTools = "d236fae5-4411-538c-8e31-a6e3d9e00b46"
1414
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
1515

1616
[compat]
17-
ArrayInterface = "2.8, 3.0, 4, 5, 6"
17+
ArrayInterfaceCore = "0.1.13"
1818
ArrayInterfaceStaticArrays = "0.1"
1919
ChainRulesCore = "1"
2020
MacroTools = "0.5"

src/LabelledArrays.jl

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

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

66
include("slarray.jl")
@@ -59,10 +59,10 @@ 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 ArrayInterface.ismutable(::Type{<:LArray{T, N, Syms}}) where {T, N, Syms}
63-
ArrayInterface.ismutable(T)
62+
function ArrayInterfaceCore.ismutable(::Type{<:LArray{T, N, Syms}}) where {T, N, Syms}
63+
ArrayInterfaceCore.ismutable(T)
6464
end
65-
ArrayInterface.can_setindex(::Type{<:SLArray}) = false
65+
ArrayInterfaceCore.can_setindex(::Type{<:SLArray}) = false
6666

6767
function PreallocationTools.get_tmp(dc::PreallocationTools.DiffCache,
6868
u::LArray{T, N, D, Syms}) where {T, N, D, Syms}

src/larray.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,10 @@ function Base.convert(::Type{AbstractArray{T, N}},
142142
end
143143
Base.convert(::Type{AbstractArray{T, N}}, x::LArray{T, N}) where {T, N} = x
144144

145-
function ArrayInterface.restructure(x::LArray{T, N, D, Syms},
146-
y::LArray{T2, N2, D2, Syms}) where {T, N, D, T2, N2, D2,
147-
Syms}
145+
function ArrayInterfaceCore.restructure(x::LArray{T, N, D, Syms},
146+
y::LArray{T2, N2, D2, Syms}) where {T, N, D, T2, N2,
147+
D2,
148+
Syms}
148149
reshape(y, size(x)...)
149150
end
150151

0 commit comments

Comments
 (0)