Skip to content

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

Closed
wants to merge 2 commits into from

Conversation

toobaz
Copy link
Member

@toobaz toobaz commented Feb 15, 2016

closes #12309


if copy or data.dtype != cls._default_dtype:
try:
subarr = np.array(data, cls._default_dtype, copy=copy)
Copy link
Contributor

Choose a reason for hiding this comment

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

pass dtype by kw

@jreback
Copy link
Contributor

jreback commented Feb 15, 2016

pls add tests for the name propogation

@jreback jreback added Indexing Related to indexing on series/frames, not to indexes themselves Compat pandas objects compatability with Numpy or Python functions labels Feb 15, 2016
@toobaz
Copy link
Member Author

toobaz commented Mar 3, 2016

Ping?
(in general, are you postponing non-0.18.0-tagged PRs to after the 0.18.0 release?)

@jreback
Copy link
Contributor

jreback commented Mar 3, 2016

@toobaz yes

@jreback
Copy link
Contributor

jreback commented Mar 3, 2016

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
Copy link
Contributor

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

@jreback
Copy link
Contributor

jreback commented May 7, 2016

@toobaz if you'd like to rebase / update, pls reopen.

@jreback jreback closed this May 7, 2016
@toobaz
Copy link
Member Author

toobaz commented May 17, 2016

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 est_ensure_copied_data as you suggested, a bug came out in DateTimeIndex, now fixed.

@toobaz
Copy link
Member Author

toobaz commented May 17, 2016

(not sure why the code isn't being updated... shall I open a new PR?)

@jorisvandenbossche
Copy link
Member

@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! :-)

@toobaz toobaz mentioned this pull request May 17, 2016
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Int64Index and Float64Index (and... ?) do not propagate name of passed index
3 participants