Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: TypeError ufunc 'isnan' not supported for the input types #1096

Merged
merged 2 commits into from
May 23, 2024

Conversation

gogetron
Copy link
Contributor

Summary

Addresses #1063

🎯 Purpose: Fix TypeError when inputs cannot be cast using numpy safe rule.

[ ✏️ Write your summary here. ]
To avoid the exception I changed np.isnan to pd.isna as suggested in #1063. In addition, I added a new test that asserts this behavior works correctly and improved the type hints of the modified function (mypy --strict now reports 2 fewer errors). When this test is run on the current master branch it raises a TypeError exception.

Testing

🔍 Testing Done: Existing test suite and the new added test.

Links to Relevant Issues or Conversations

🔗 What Git or Slack items (Issues, threads, etc) that are specifically related to
this work? Please link them here.

#1063

References

Reviewer Notes

💡 Include any specific points for the reviewer to consider during their review.

Copy link

codecov bot commented Apr 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.19%. Comparing base (0221f8b) to head (d1d89e2).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1096      +/-   ##
==========================================
+ Coverage   96.18%   96.19%   +0.01%     
==========================================
  Files          76       76              
  Lines        5996     6014      +18     
  Branches      992     1000       +8     
==========================================
+ Hits         5767     5785      +18     
  Misses        135      135              
  Partials       94       94              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@elisno elisno merged commit 3effc12 into cleanlab:master May 23, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants