Skip to content

BUG giving modulo operator back to Int64Index #12012

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

Closed
wants to merge 1 commit into from
Closed

BUG giving modulo operator back to Int64Index #12012

wants to merge 1 commit into from

Conversation

nbonnotte
Copy link
Contributor

Fix issue #9244

@jreback jreback added Bug Indexing Related to indexing on series/frames, not to indexes themselves labels Jan 11, 2016
@jreback jreback added this to the 0.18.0 milestone Jan 11, 2016
intidx = Index(range(10))
expected = Int64Index([0, 1, 0, 1, 0, 1, 0, 1, 0, 1], dtype='int64')
self.assert_index_equal(intidx % 2, expected)

Copy link
Contributor

Choose a reason for hiding this comment

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

you are adding this test in a generic section, so it is not doing what you think. instead define in the Numeric section and use .create_index. As I think this works for more index types.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, it works for Float64Index as well

@nbonnotte
Copy link
Contributor Author

@jreback you were right, this also allows the use of the modulo operator for Float64Index

I've updated the tests and the what's new

@jreback
Copy link
Contributor

jreback commented Jan 14, 2016

merged via 4625d4d

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants