Skip to content

no methods implemented for integer arrays #26

Description

@mvhulten

Maybe this is a specific case of #17, but I don't understand everything in that issue. All users (even myself!) will understand this issue:

julia> mean([1 2 3])
2.0

julia> NaNMath.mean([1 2 3])
ERROR: MethodError: no method matching mean(::Array{Int64,2})
You may have intended to import Base.mean
Closest candidates are:
  mean(::AbstractArray{T<:AbstractFloat,N} where N) where T<:AbstractFloat at /home/mhu027/.julia/v0.6/NaNMath/src/NaNMath.jl:163

julia> NaNMath.mean([1 2 π])
2.047197551196598

It would be a useful feature if the NaNMath routines will accept more types like integer.

I am using Julia 0.6.2 and NaNMath 0.3.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions