Skip to content

Commit

Permalink
=fix deprecations (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
oxinabox authored and ahwillia committed Nov 21, 2017
1 parent e54b4d9 commit 21b792f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
julia 0.5
IterTools
julia 0.6
IterTools
6 changes: 3 additions & 3 deletions src/splitview.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@generated function splitview{T,N}(::Type{T},arr::NTuple{N,Tuple})
quote
len = 0
@nexprs $N (n)->(s_n = len+1; e_n = len+prod(arr[n]); len = e_n)
@nexprs $N (n)->(s_n = len+1; e_n = len+prod(arr[n]); len = e_n)
x = Array{T}(len)
X = @ntuple $N (n)->(reshape(view(x,s_n:e_n),arr[n]))
start = @ntuple $N (n)->(s_n)
Expand All @@ -17,7 +17,7 @@ end
@generated function splitview{T,N}(x::AbstractVector{T},arr::NTuple{N,Tuple})
quote
len = 0
@nexprs $N (n)->(s_n = len+1; e_n = len+prod(arr[n]); len = e_n)
@nexprs $N (n)->(s_n = len+1; e_n = len+prod(arr[n]); len = e_n)
X = @ntuple $N (n)->(reshape(view(x,s_n:e_n),arr[n]))
start = @ntuple $N (n)->(s_n)
stop = @ntuple $N (n)->(e_n)
Expand All @@ -26,7 +26,7 @@ end
end

# unexported from Base
FastContiguousSubArray{T,N,P,I<:Tuple{Union{Colon, UnitRange}, Vararg{Any}}} = SubArray{T,N,P,I,true}
const FastContiguousSubArray{T,N,P,I<:Tuple{Union{Colon, UnitRange}, Vararg{Any}}} = SubArray{T,N,P,I,true}

parentindex(A::FastContiguousSubArray, i::Int) = A.offset1 + i
parentindex(A::FastContiguousSubArray, i::Int...) = A.offset1 + prod(i)
Expand Down

0 comments on commit 21b792f

Please sign in to comment.