Skip to content

Consider allowing default in quantile and median #132

Open
@bkamins

Description

@bkamins

In generic code the fact that the following operations error:

julia> median(Int[])
ERROR: ArgumentError: median of an empty array is undefined, Int64[]

julia> quantile(Int[], 0.5)
ERROR: ArgumentError: empty data vector

is inconvenient (as the only work-around is try-catch). Maybe we could allow passing default kwarg that would be returned when the passed collection is empty?

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