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

CLN: remove _ndarray_values #32768

Merged
merged 3 commits into from
Mar 19, 2020
Merged

Conversation

jbrockmendel
Copy link
Member

@jreback jreback added the Clean label Mar 17, 2020
@jreback jreback added this to the 1.1 milestone Mar 17, 2020
@@ -2570,8 +2566,7 @@ def _get_codes_for_values(values, categories):
if dtype_equal:
# To prevent erroneous dtype coercion in _get_data_algo, retrieve
# the underlying numpy array. gh-22702
values = getattr(values, "_ndarray_values", values)
categories = getattr(categories, "_ndarray_values", categories)
pass
Copy link
Member

Choose a reason for hiding this comment

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

This is nice on a first pass at the diff, but probably better just to blow this branch away

@@ -623,7 +622,10 @@ def ravel(self, order="C"):
--------
numpy.ndarray.ravel
"""
return self._ndarray_values.ravel(order=order)
values = self._values
if not isinstance(values, np.ndarray):
Copy link
Member

Choose a reason for hiding this comment

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

Is there not a more generic way to accomplish this?

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

lgtm

@jreback jreback merged commit 4661928 into pandas-dev:master Mar 19, 2020
@jreback
Copy link
Contributor

jreback commented Mar 19, 2020

boom!

@jbrockmendel jbrockmendel deleted the no-ndarray_values branch March 19, 2020 01:30
SeeminSyed pushed a commit to CSCD01-team01/pandas that referenced this pull request Mar 22, 2020
jbrockmendel added a commit to jbrockmendel/pandas that referenced this pull request Mar 23, 2020
jbrockmendel added a commit to jbrockmendel/pandas that referenced this pull request Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API / internals: exact semantics of _ndarray_values
3 participants