Skip to content

[BUG] fix deep_equals on objects which have __len__ but len(obj) causes exception#303

Merged
fkiraly merged 3 commits into
mainfrom
fix-deep_equals-len
Mar 2, 2024
Merged

[BUG] fix deep_equals on objects which have __len__ but len(obj) causes exception#303
fkiraly merged 3 commits into
mainfrom
fix-deep_equals-len

Conversation

@fkiraly
Copy link
Copy Markdown
Contributor

@fkiraly fkiraly commented Mar 2, 2024

Fixes #302 by using a safe way to read length.

Also adds the MRE #302 as a test case, to cover this edge case.

FYI @MBristle, and we thought the fix was easy...

@fkiraly fkiraly merged commit 929b1fb into main Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] deep_equals fails on sklearn RandomForestRegressor unfitted instances

1 participant