Skip to content

Comparison of float bug in radiance_irs.py #105

Description

@karpob

fix.txt

When trying to duplicate the largest pc score behavior in the ioda converter I've been developing, I noticed the comparison of two float values with an ==. There are two problems with this:

  1. It's bad practice and is likely to create bugs down the line depending on numpy updates, etc.
  2. It is impossible to create a vectorized version of this as the == has irreproducible behavior.

I'm still working on implementing the vectorized version in my code and you may want to look at it, but short-term I'd recommend the following patch (sorry, can't create a branch/pull request no permissions to do so).

Activity

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions