Skip to content

Error dividing by zero in biweight_midvar #2

@mathrip

Description

@mathrip

in biweight_midvar, if more than half of the datapoint have the same value the np.median(abs(data - center) will be 0
Then it creates nan values when dividing n * num/dem because dem is 0

It should not be possible to divide by zero here, need to add an error message or divide by something else than 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions