I have trouble using the function isnan. I want to replace NaN value by 0. any help?
julia> a=[1 2 3; 4 5 NaN]
2×3 Array{Float64,2}:
1.0 2.0 3.0
4.0 5.0 NaN
julia> a[isnan(a)]=0
ERROR: MethodError: no method matching isnan(::Array{Float64,2})
Closest candidates are:
isnan(::BigFloat) at mpfr.jl:879
isnan(::Missing) at missing.jl:83
isnan(::Float16) at float.jl:530
…
Stacktrace:
[1] top-level scope at none:0