Skip to content

Commit

Permalink
define Base.axes methods for TS objects for newer julia versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dysonance committed Aug 1, 2018
1 parent 365fddd commit 5ef821b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/indexing/getindex.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import Base:getindex
import Base.getindex

# define axes function for newer julia versions
if VERSION >= v"0.7-"
import Base.axes
axes(x::TS) = axes(x.values)
axes(x::TS, d) = axes(x.values, d)
end

# all element indexing
getindex(x::TS) = x
Expand Down

0 comments on commit 5ef821b

Please sign in to comment.