-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Common NumericIndex.__new__, with fixed name handling #12331
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
Conversation
|
||
if copy or data.dtype != cls._default_dtype: | ||
try: | ||
subarr = np.array(data, cls._default_dtype, copy=copy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pass dtype
by kw
pls add tests for the name propogation |
Ping? |
@toobaz yes |
though non-api changes or straightforward stuff I will merge (so pinging is good) |
if name is not None: | ||
names = name | ||
if name is None and hasattr(levels, 'name'): | ||
name = levels.name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how does this check help? levels
is a list-like
@toobaz if you'd like to rebase / update, pls reopen. |
Rebased, updated, addressed your comments, except a couple of them which were unclear to me. I don't think I am allowed to reopen. While extending |
(not sure why the code isn't being updated... shall I open a new PR?) |
@toobaz yes, you will have to open a new PR. That's something with github that you cannot reopen a PR once the branch has been updated while the PR is closed (so we should have reopened it before you pushed updated to the branch ..). Anyway, no problem to open a new one! :-) |
closes #12309