Skip to content

Integer input not accepted #27

@jrfiedler

Description

@jrfiedler

The loess function doesn't accept integer input:

julia> using Loess

julia> x = [1, 2, 3, 4];

julia> y = [1.0, 2.0, 3.0, 4.0];

julia> model = loess(x, y, span = 0.33);
ERROR: MethodError: no method matching loess(::Array{Int64,1}, ::Array{Float64,1}; span=0.25)
Closest candidates are:
  loess(::AbstractArray{T<:AbstractFloat,2}, ::AbstractArray{T<:AbstractFloat,1}; normalize, span, degree) where T<:AbstractFloat at /home/jf/.julia/packages/Loess/TaYdb/src/Loess.jl:42
  loess(::AbstractArray{T<:AbstractFloat,1}, ::AbstractArray{T<:AbstractFloat,1}; normalize, span, degree) where T<:AbstractFloat at /home/jf/.julia/packages/Loess/TaYdb/src/Loess.jl:110
Stacktrace:
 [1] top-level scope at none:0

The error goes away if x is float.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions