Skip to content

Conversation

@topper-123
Copy link
Contributor

Finishes up the renaming started by #29509 in core.algorithms of 'labels' to 'codes.' Also renames in related tests.

Returns
-------
labels : ndarray
codes : ndarray
Copy link
Member

Choose a reason for hiding this comment

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

do we necessarily know the dtype? e.g. could this be ndarray[int64]?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As it's implemented, codes will always be of type ndarray[int64]. I've got a suspicion taht there are cases where would like it to return arrays of fewer bits, but yes, as it is now, it always is an int64 array.

@jreback jreback added the Clean label Nov 12, 2019
@jreback jreback added this to the 1.0 milestone Nov 12, 2019
def safe_sort(
values,
labels=None,
codes=None,
Copy link
Contributor

Choose a reason for hiding this comment

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

followup to type this would be great

@jreback jreback merged commit 69856e3 into pandas-dev:master Nov 12, 2019
@jreback
Copy link
Contributor

jreback commented Nov 12, 2019

thanks @topper-123 if you'd like to followup with typing where indicated would be great.

Reksbril pushed a commit to Reksbril/pandas that referenced this pull request Nov 18, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 participants