10000 Makes NumericIndex constructor dtype aware by oguzhanogreden · Pull Request #29529 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

Makes NumericIndex constructor dtype aware #29529

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

Merged
merged 18 commits into from
Nov 17, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adds type hint for dtype and requires it
  • Loading branch information
oguzhanogreden committed Nov 17, 2019
commit 60b4f7bfefaad7baac1e5e0ab86a14b701c30c3c
3 changes: 2 additions & 1 deletion pandas/core/indexes/numeric.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from typing import Optional
import warnings

import numpy as np
Expand Down Expand Up @@ -130,7 +131,7 @@ def _assert_safe_casting(cls, data, subarr):
pass

@classmethod
def _coerce_to_ndarray(cls, data, dtype=None):
def _coerce_to_ndarray(cls, data, dtype: Optional[np.dtype]):
"""
Coerces data to ndarray.

Expand Down
0