Skip to content

Commit 4e8e528

Browse files
committed
fix warning on julia 1.7
Warning: use values(kwargs) and keys(kwargs) instead of kwargs.data and kwargs.itr Comes from JuliaLang/julia#39448
1 parent d57b37e commit 4e8e528

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/names.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ end
100100
@inline @propagate_inbounds function getkey(A; kw...)
101101
list = dimnames(A)
102102
issubset(keys(kw), list) || error("some keywords not in list of names!")
103-
args = map(s -> Base.sym_in(s, kw.itr) ? getfield(values(kw), s) : Colon(), list)
103+
args = map(s -> Base.sym_in(s, keys(kw)) ? getfield(values(kw), s) : Colon(), list)
104104
A(args...)
105105
end
106106

src/push.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ append!!(r::AbstractVector, s::AbstractVector) = (extend_by!!(r, length(s)); vca
8989
This pushes `val` into `A.data`, and pushes `key` to `axiskeys(A,1)`.
9090
Both of these must be legal operations, e.g. `A = wrapdims([1], ["a"]); push!(A, b=2)`.
9191
"""
92-
Base.push!(A::KeyedArray; kw...) = push!(A, map(Pair, keys(kw), values(kw.data))...)
92+
Base.push!(A::KeyedArray; kw...) = push!(A, map(Pair, keys(kw), values(values(kw)))...)
9393

9494
function Base.push!(A::KeyedArray, pairs::Pair...)
9595
axiskeys(A,1) isa AbstractRange && error("can't use push!(A, key => val) when axiskeys(A,1) isa AbstractRange")

src/show.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ struct ShowWith{T,NT} <: AbstractString
137137
hide::Bool
138138
nt::NT
139139
ShowWith(val; hide::Bool=false, kw...) =
140-
new{typeof(val),typeof(kw.data)}(val, hide, kw.data)
140+
new{typeof(val),typeof(values(kw))}(val, hide, values(kw))
141141
end
142142
function Base.show(io::IO, x::ShowWith; kw...)
143143
# ioc = IOContext(io, :compact => true) # using this really breaks spacing!

0 commit comments

Comments
 (0)