Skip to content

Commit e883efe

Browse files
committed
Fixed KeepIndex stuff for older Julias
1 parent 249cd72 commit e883efe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/componentindex.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Base.getindex(ax::AbstractAxis, i::KeepIndex{Idx}) where {Idx} = _getindex_keep(
2525
_getindex_keep(ax::AbstractAxis, ::Colon) = ComponentIndex(:, ax)
2626
function _getindex_keep(ax::AbstractAxis, idx::AbstractRange)
2727
idx_map = indexmap(ax)
28-
keeps = NamedTuple(s=>x for (s,x) in pairs(idx_map) if first(viewindex(x)) in idx && last(viewindex(x)) in idx)
28+
keeps = NamedTuple([s=>x for (s,x) in pairs(idx_map) if first(viewindex(x)) in idx && last(viewindex(x)) in idx])
2929
new_ax = reindex(Axis(keeps), -first(idx)+1)
3030
return ComponentIndex(idx, new_ax)
3131
end

0 commit comments

Comments
 (0)