Skip to content

Commit b334d90

Browse files
authored
Merge pull request #48 from JuliaArrays/teh/nocompat
Drop the Compat requirement
2 parents b034c72 + 4ab1784 commit b334d90

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

REQUIRE

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
julia 0.5-
1+
julia 0.5
22
IntervalSets
33
Iterators
4-
Compat
54
RangeArrays

src/AxisArrays.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ __precompile__()
33
module AxisArrays
44

55
using Base: tail
6-
using RangeArrays, Iterators, IntervalSets, Compat
7-
using Compat.view
6+
using RangeArrays, Iterators, IntervalSets
87

98
export AxisArray, Axis, axisnames, axisvalues, axisdim, axes, atindex
109

src/core.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ immutable Axis{name,T}
5252
val::T
5353
end
5454
# Constructed exclusively through Axis{:symbol}(...) or Axis{1}(...)
55-
@compat (::Type{Axis{name}}){name,T}(I::T=()) = Axis{name,T}(I)
56-
@compat Base.:(==){name}(A::Axis{name}, B::Axis{name}) = A.val == B.val
55+
(::Type{Axis{name}}){name,T}(I::T=()) = Axis{name,T}(I)
56+
Base.:(==){name}(A::Axis{name}, B::Axis{name}) = A.val == B.val
5757
Base.hash{name}(A::Axis{name}, hx::UInt) = hash(A.val, hash(name, hx))
5858
axistype{name,T}(::Axis{name,T}) = T
5959
axistype{name,T}(::Type{Axis{name,T}}) = T
@@ -66,7 +66,7 @@ Base.size(A::Axis) = size(A.val)
6666
Base.indices(A::Axis) = indices(A.val)
6767
Base.indices(A::Axis, d) = indices(A.val, d)
6868
Base.length(A::Axis) = length(A.val)
69-
@compat (A::Axis{name}){name}(i) = Axis{name}(i)
69+
(A::Axis{name}){name}(i) = Axis{name}(i)
7070
Base.convert{name,T}(::Type{Axis{name,T}}, ax::Axis{name,T}) = ax
7171
Base.convert{name,T}(::Type{Axis{name,T}}, ax::Axis{name}) = Axis{name}(convert(T, ax.val))
7272

test/core.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ A = AxisArray(vals, Axis{:Timestamp}(dt-Dates.Hour(2):Dates.Hour(1):dt+Dates.Hou
171171
@test A[dt, :].data == vals[3, :]
172172

173173
# Simply run the display method to ensure no stupid errors
174-
@compat show(IOBuffer(),MIME("text/plain"),A)
174+
show(IOBuffer(),MIME("text/plain"),A)
175175

176176
# With unconventional indices
177177
import OffsetArrays # import rather than using because OffsetArrays has a deprecation for ..

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using AxisArrays
2-
using Base.Test, Compat
2+
using Base.Test
33

44
@test isempty(detect_ambiguities(AxisArrays, Base, Core))
55

0 commit comments

Comments
 (0)