FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

spurious warning with nans in log-scale plot · Issue #7143 · matplotlib/matplotlib · GitHub

Repository navigation

spurious warning with nans in log-scale plot #7143

Closed

Description

mpl1.5.3 and mpl2.0b4

semilogy([1, 2, 3], [1, np.nan, 2], "o")

triggers a warning:

/usr/lib/python3.5/site-packages/matplotlib/scale.py:93: RuntimeWarning: invalid value encountered in less_equal
  mask = a <= 0.0

due to the comparison that involves a nan. I think this warning should be masked out (likely with the application of a np.errstate at the right place), given that nans are (AFAIK) a fully supported mechanism for hiding a point in a plot, and e.g. do not raise any warning in linear scale.

Activity

  1. efiring commented on Sep 20, 2016

    Member

    I agree. The function below that one will need the same treatment. Also _clip_non_logit and _mask_non_logit farther down. It's not clear why these pairs of nearly-identical functions are implemented differently. Direct indexing appears to be faster than using where.

  2. added this to the milestone on Sep 20, 2016
  3. tacaswell commented on Sep 20, 2016

    Member

    Probably related to #7129

    Are these warnings new in numpy 1.11?

  4. modified the milestones: , on Dec 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL