Skip to content

Provide a kwarg to turn off data healthy check. #156

@GiggleLiu

Description

@GiggleLiu

Great tool!

For some user defined types, the following check would break for not having isinf and isnan.

function check_data_health(xdata, ydata)
    if any(ismissing, xdata) || any(ismissing, ydata)
        error("Data contains `missing` values and a fit cannot be performed")
    end
    if any(isinf, xdata) || any(isinf, ydata) || any(isnan, xdata) || any(isnan, ydata)
        error("Data contains `Inf` or `NaN` values and a fit cannot be performed")
    end
end

An example is StaticArray. By overloading this check (so called prirating), everything works fine.
I guess it would be good to provide a kwarg to allow user to switch off this check?

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