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

DEPR: Move Numericindex._convert_slice_indexer & ._maybe_cast_slice_bound #50989

Merged
merged 3 commits into from Jan 27, 2023

Conversation

topper-123
Copy link
Contributor

@topper-123 topper-123 commented Jan 26, 2023

Moves_convert_slice_indexer & _maybe_cast_slice_bound from NumericIndexto Index in preparation to remove NumericIndex and include numpy int/uint/float64 in the base Index.

Each commit contains one method moving each, could be easier to view each method separately in the commit.

xref #42717.

@@ -3983,6 +3983,13 @@ def _convert_slice_indexer(self, key: slice, kind: str_t):
# potentially cast the bounds to integers
start, stop, step = key.start, key.stop, key.step

# TODO(GH#50617): once Series.__[gs]etitem__ is removed we should be able
# to simplify this.
if is_float_dtype(self.dtype):
Copy link
Member

Choose a reason for hiding this comment

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

need to specify numpy dtype

@mroeschke mroeschke added the Deprecate Functionality to remove in pandas label Jan 26, 2023
@topper-123
Copy link
Contributor Author

Updated.

Copy link
Member

@jbrockmendel jbrockmendel left a comment

Choose a reason for hiding this comment

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

LGTM

@phofl phofl added this to the 2.0 milestone Jan 27, 2023
@phofl phofl merged commit 22de62c into pandas-dev:main Jan 27, 2023
@phofl
Copy link
Member

phofl commented Jan 27, 2023

thx @topper-123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants