Skip to content

CLN: De-privatize core.common funcs, remove unused #22001

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 19 commits into from
Jul 24, 2018
Merged
Show file tree
Hide file tree
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
Fixup missed changes
  • Loading branch information
jbrockmendel committed Jul 20, 2018
commit 6b7fd33b9d5861808c4442aec57f60341233a298
4 changes: 2 additions & 2 deletions pandas/core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def intersection(*seqs):
return type(seqs[0])(list(result))


def _asarray_tuplesafe(values, dtype=None):
def asarray_tuplesafe(values, dtype=None):

if not (isinstance(values, (list, tuple)) or hasattr(values, '__array__')):
values = list(values)
Expand Down Expand Up @@ -318,7 +318,7 @@ def _index_labels_to_array(labels, dtype=None):
except TypeError: # non-iterable
labels = [labels]

labels = _asarray_tuplesafe(labels, dtype=dtype)
labels = asarray_tuplesafe(labels, dtype=dtype)

return labels

Expand Down
2 changes: 1 addition & 1 deletion pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def __new__(cls, data=None, dtype=None, copy=False, name=None,
else:
subarr = com.asarray_tuplesafe(data, dtype=object)

# _asarray_tuplesafe does not always copy underlying data,
# asarray_tuplesafe does not always copy underlying data,
# so need to make sure that this happens
if copy:
subarr = subarr.copy()
Expand Down