Skip to content

inconsistent comparison operation results #948

Closed
@adamklein

Description

@adamklein

In [4]: i = Index([1,2,3,4])

In [5]: i
Out[5]: Int64Index([1, 2, 3, 4])

In [6]: i == i
Out[6]: Int64Index([ 1, 1, 1, 1])

In [7]: i == 0
Out[7]: array([False, False, False, False], dtype=bool)

In [8]: i == 1
Out[8]: array([ True, False, False, False], dtype=bool)

In [9]: i == np.array([1,2,3,4])
Out[9]: array([ True, True, True, True], dtype=bool)

In [10]: i == Index([1,2,3,4])
Out[10]: Int64Index([ 1, 1, 1, 1])

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions