Thanks to visit codestin.com
Credit goes to github.com

Skip to content

deal with nan inputs more consistently #4086

@argriffing

Description

@argriffing

Because IPython + pandas seems to be becoming the usual interface to the scipy stack, and because pandas uses NaN to mean NA, more of the lower-level projects like scipy are seeing NaN inputs that are not the results of undefined operations.

Debugging these NaN-related problems seems to involve multiple issues that are usually not distinguished in the original bug reports.

  1. scipy propagates NaN more than strictly necessary, regardless of NaN semantics
  2. scipy complains about NaN creation, but not necessarily about NaN propagation
  3. scipy doesn't generally use NaN to mean 'missing data'.

Technically, none of these issues are bugs. Improving (1) could be helpful to avoid misunderstandings about how scipy treats NaNs, and maybe it would be worth adding more complaints for (2). I don't think scipy will ever change (3) until a numpy-like layer implements separate NA and NaN.

#4060
#4067
scikit-learn/scikit-learn#3782

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions