Skip to content

Conversation

@xhochy
Copy link
Contributor

@xhochy xhochy commented Jun 9, 2020

@jorisvandenbossche jorisvandenbossche added Bug ExtensionArray Extending pandas with custom dtypes or arrays. labels Jun 9, 2020
@jorisvandenbossche jorisvandenbossche added this to the 1.1 milestone Jun 9, 2020
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good to me!



def test_basic_equals(data):
assert pd.Series(data).equals(pd.Series(data))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a BaseMethodsTests test_equals that could in theory be reused here. But since none of the other methods are implemented, we would need to skip all other tests, which would be a bit onerous. So fine with a custom test.

return (equal_values | equal_na).all().item()
result = (equal_values | equal_na).all()

if isinstance(result, np.bool_):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bool(result) should work

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed and CI passed.

@jorisvandenbossche jorisvandenbossche merged commit 8417b4b into pandas-dev:master Jun 9, 2020
@jorisvandenbossche
Copy link
Member

Thanks!

@xhochy xhochy deleted the gh-34660 branch June 9, 2020 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug ExtensionArray Extending pandas with custom dtypes or arrays.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: ExtensionArray.equals expects ExtensionArray.all to return a numpy.bool_

3 participants