From 1d62a2ac206a6bede0007cac5dd5db25e1d68b69 Mon Sep 17 00:00:00 2001 From: Lyndon White Date: Thu, 15 Jul 2021 16:06:05 +0100 Subject: [PATCH] use max rather than maximum to decide if need to use epislon (#98) --- src/scaling.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scaling.jl b/src/scaling.jl index 3fd4b7b..35e9a9d 100644 --- a/src/scaling.jl +++ b/src/scaling.jl @@ -75,6 +75,6 @@ function _apply(A::AbstractArray, scaling::MeanStdScaling; inverse=false, eps=1e # Avoid division by 0 # If std is 0 then data was uniform, so the scaled value would end up ≈ 0 # Therefore the particular `eps` value should not matter much. - σ_safe = maximum([scaling.σ, eps]) + σ_safe = max(scaling.σ, eps) return (A .- scaling.μ) ./ σ_safe end