Skip to content

Commit

Permalink
silence 0.6 depwarns
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj committed Mar 28, 2017
1 parent 62245fa commit 8f52681
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
julia 0.4
Compat 0.2
Compat 0.9.4
8 changes: 4 additions & 4 deletions src/Hadamard.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function hadamardize(dims::Array{Int,2}, bitreverse::Bool)
end
ntot += trailing_zeros(n)
end
hdims = Array(Int,3,ntot)
hdims = Array{Int}(3,ntot)
j = 0
for i = 1:size(dims,2)
n = dims[1,i]
Expand Down Expand Up @@ -77,7 +77,7 @@ for (Tr,Tc,fftw,lib) in ((:Float64,:Complex128,"fftw",FFTW.libfftw),
set_timelimit($Tr, timelimit)
dims, howmany = dims_howmany(X, Y, [size(X)...], region)
dims = hadamardize(dims, bitreverse)
kind = Array(Int32, size(dims,2))
kind = Array{Int32}(size(dims,2))
kind[:] = R2HC
plan = ccall(($(string(fftw,"_plan_guru64_r2r")),$lib),
PlanPtr,
Expand Down Expand Up @@ -139,7 +139,7 @@ function ifwht{T<:fftwNumber}(X::Array{T}, region)
return [ Y[1 + ((i >> 1) $ i)] for i = 0:length(Y)-1 ]
else
sz = [size(Y)...]
tmp = Array(T, maximum(sz[region])) # storage for out-of-place perm.
tmp = Array{T}(maximum(sz[region])) # storage for out-of-place perm.
for d in region
# somewhat ugly loops to do 1d permutations along dimension d
na = prod(sz[d+1:end])
Expand All @@ -150,7 +150,7 @@ function ifwht{T<:fftwNumber}(X::Array{T}, region)
for ib = 1:nb
i0 = ib + sa * ia
for i = 0:n-1
tmp[i+1] = Y[i0 + nb * ((i >> 1) $ i)]
tmp[i+1] = Y[i0 + nb * ((i >> 1) i)]
end
for i = 0:n-1
Y[i0 + nb * i] = tmp[i+1]
Expand Down
6 changes: 3 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Hadamard
using Hadamard, Compat
using Base.Test

H8 = [ 1 1 1 1 1 1 1 1
Expand Down Expand Up @@ -83,8 +83,8 @@ H32 = [ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
@test ifwht(ieye(32),1) == H32
@test ifwht(ieye(32),2)' == H32

X = reshape(sin([1:1024*32;]), 1024,32);
norminf(A) = maximum(abs(A))
X = @compat reshape(sin.([1:1024*32;]), 1024,32);
norminf(A) = @compat maximum(abs.(A))

for f in (:fwht, :fwht_natural, :fwht_dyadic)
fi = Symbol(string("i", f))
Expand Down

0 comments on commit 8f52681

Please sign in to comment.