You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
contours does not accept a z of Ints. A use case is count data:
using Contour
using StatsBase
N =10000
x =randn(N)
y =randn(N)
H =fit(Histogram, (x, y), closed =:left)
contours(midpoints.(H.edges)..., H.weights) # failscontours(midpoints.(H.edges)..., Float64.(H.weights)) # works
The error message for the failing one is
julia>contours(midpoints.(H.edges)..., H.weights)
ERROR: MethodError: no method matching interpolate(::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}, ::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}, ::Array{Int64,2}, ::Float64, ::Int64, ::Int64, ::UInt8)
Closest candidates are:interpolate(::Any, ::Any, ::Array{T<:AbstractFloat,2}, ::Number, ::Int64, ::Int64, ::UInt8) where T<:AbstractFloat at /home/tamas/.julia/v0.6/Contour/src/Contour.jl:232
Stacktrace:
[1] trace_contour(::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}, ::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}, ::Array{Int64,2}, ::Float64, ::Dict{Tuple{Int64,Int64},Contour.Cell}) at /home/tamas/.julia/v0.6/Contour/src/Contour.jl:328
[2] collect(::Base.Generator{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Contour.##1#2{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Int64,2}}}) at ./array.jl:475
[3] contours at /home/tamas/.julia/v0.6/Contour/src/Contour.jl:81 [inlined]
[4] contours at /home/tamas/.julia/v0.6/Contour/src/Contour.jl:88 [inlined]
[5] contours(::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}, ::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}, ::Array{Int64,2}) at /home/tamas/.julia/v0.6/Contour/src/Contour.jl:94
The text was updated successfully, but these errors were encountered:
contours
does not accept az
ofInt
s. A use case is count data:The error message for the failing one is
The text was updated successfully, but these errors were encountered: