Skip to content

maximum/minimum do not return nans #535

@lshaw8317

Description

@lshaw8317

In numpy, np.maximum(NaN, 2) returns NaN, but in C, fmax(Nan, 2) returns 2. Numexpr maximum/minimum calls the C-routine and doesn't perform any checks. Should be enough to just replace the functions via something like
{x if isnan(x), y if isnan(y) else fmin(x,y)}.

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