Skip to content

Commit

Permalink
inbounds blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
tinybike committed Mar 23, 2015
1 parent 76b9b31 commit c2d0f60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/center.jl
Expand Up @@ -3,7 +3,7 @@ function center{T<:Real}(data::Matrix{T};
standardize::Bool=false,
bias::Int=0)
num_samples, num_signals = size(data)
begin
@inbounds begin
avgs = mean(data, 1)
cntr = data .- avgs

Expand All @@ -28,7 +28,7 @@ function center{T<:Real}(data::Matrix{T},
length(w) == num_samples || throw(DimensionMismatch("Inconsistent array lengths."))

# Weighted detrending
begin
@inbounds begin
avgs = mean(data, weights(w), 1)
cntr = data .- avgs
if standardize
Expand Down

0 comments on commit c2d0f60

Please sign in to comment.