Skip to content

Quantile output not sorted #164

@cstjean

Description

@cstjean

On Julia 0.4.5 and the latest release of StatsBase:

y = [0.40003674665581906,0.4085630862624367,0.41662034698690303,0.41662034698690303,0.42189053966652057,0.42189053966652057,0.42553514344518345,0.43985732442991354]
issorted(quantile(y, linspace(0.01, 0.99, 17)))   # false

The quantiles are:

[0.4006335904282823,0.4042892585346196,0.40794492664095694,
0.4114334853955278,0.41488803593114276,
0.41662034698690303,0.416620346986903, # these two not in order
0.4169958482153258,0.41925544332671183,0.4215150384380978,0.42189053966652057,
0.42189053966652057,0.4226741294789331,0.42423675334903477,0.42657350156657636,
0.4327141366637794,0.4388547717609824]

Is that a bug, or is it a conscious decision to define "empty quantiles"?

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