Skip to content

Commit d11d871

Browse files
JeffFesslerjohnnychen94
authored andcommitted
fix deprecations
1 parent bf961cf commit d11d871

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,9 @@ function AxisArray(A::AbstractArray{T,N}, names::NTuple{N,Symbol}, steps::NTuple
240240
end
241241

242242
# Alternative constructor, takes names as keywords:
243-
AxisArray(A; kw...) = AxisArray(A, nt_to_axes(kw.data)...)
244-
@generated nt_to_axes(nt::NamedTuple) =
245-
Expr(:tuple, (:(Axis{$(QuoteNode(n))}(getfield(nt, $(QuoteNode(n))))) for n in nt.names)...)
243+
AxisArray(A; kw...) = AxisArray(A, nt_to_axes(values(kw)))
244+
@generated nt_to_axes(nt::NamedTuple{names,T}) where {names,T} =
245+
Expr(:tuple, (:(Axis{$(QuoteNode(n))}(getfield(nt, $(QuoteNode(n))))) for n in names)...)
246246

247247
AxisArray(A::AxisArray) = A
248248
AxisArray(A::AxisArray, ax::Vararg{Axis, N}) where N =

0 commit comments

Comments
 (0)