From 83e96fe30aa2dbc0c49211d6ee598b8b7ea77da2 Mon Sep 17 00:00:00 2001 From: Eric Hanson <5846501+ericphanson@users.noreply.github.com> Date: Mon, 16 Oct 2023 20:04:32 +0200 Subject: [PATCH] Update src/export_edf.jl Co-authored-by: Dave Kleinschmidt --- src/export_edf.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/export_edf.jl b/src/export_edf.jl index ddae246..1805e38 100644 --- a/src/export_edf.jl +++ b/src/export_edf.jl @@ -157,8 +157,7 @@ function reencode_samples(samples::Samples, sample_type::Type{<:Integer}=Int16) smin, smax = extrema(samples.data) # If the input is flat, normalize to zero and one if smin == smax - smax = one(smax) - smin = zero(smin) + smax = smin + one(smax) end emin, emax = typemin(sample_type), typemax(sample_type)