Closed gottacatchenall closed 2 years ago
Describe the bug If you call normalize on an initial landscape with NaNs, some numbers get turned into nans
normalize
To Reproduce
using Plots using SimpleSDMLayers using Distributions ENV["SDMLAYERS_PATH"] = "/home/michael/data/" quebec = SimpleSDMPredictor(WorldClim, BioClim; left=-90., right=-55., top=60., bottom=45.) qcmask = fill(true, size(quebec)) qcmask[findall(isnothing, quebec.grid)] .= false init = rand(PerlinNoise((2,2)), size(quebec), mask=qcmask) svu = SpatiotemporallyAutocorrelatedUpdater( rate = 0.01, variability = 0.01, spatialupdater = PlanarGradient(90) ) seq = normalize(update(svu, init, 30))
Expected behavior Should leave NaNs in place but not convert numbers to NaNs
Probably findmin and findmax? Consider replacing with NaNMath.min?
findmin
findmax
NaNMath.min
Yes I think so, should be an easy fix
closed in #62
Describe the bug If you call
normalize
on an initial landscape with NaNs, some numbers get turned into nansTo Reproduce
Expected behavior Should leave NaNs in place but not convert numbers to NaNs