Skip to content

Commit

Permalink
Merge pull request #2 from HolyLab/teh/0.5view
Browse files Browse the repository at this point in the history
Update for julia-0.5
  • Loading branch information
timholy committed Jan 15, 2017
2 parents a3a4f1d + da89584 commit 43ccba0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Compat
4 changes: 3 additions & 1 deletion src/RFFT.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ __precompile__()

module RFFT

using Compat

export RCpair, plan_rfft!, plan_irfft!, rfft!, irfft!, normalization

import Base: real, complex, copy, copy!
Expand All @@ -19,7 +21,7 @@ function RCpair{T<:AbstractFloat}(realtype::Type{T}, realsize, region=1:length(r
C = Array(Complex{T}, sz...)
sz[firstdim] *= 2
R = reinterpret(T, C, tuple(sz...))
RCpair(sub(R, map(n->1:n, realsize)...), C, [region...])
RCpair(Compat.view(R, map(n->1:n, realsize)...), C, [region...])
end
RCpair{T<:AbstractFloat}(A::Array{T}, region=1:ndims(A)) = copy!(RCpair(T, size(A), region), A)

Expand Down

0 comments on commit 43ccba0

Please sign in to comment.