Skip to content

REF: add custom Exception for safe_sort #25569

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 12 commits into from
Prev Previous commit
Next Next commit
fix py2 failures
  • Loading branch information
simonjayhawkins committed Mar 6, 2019
commit a99e3a2f311e05eab4dfdfa5e7909de66e0560e7
2 changes: 1 addition & 1 deletion pandas/core/sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,9 @@ def sort_mixed(values):
dtype=bool)
try:
nums = np.sort(values[~str_pos])
strs = np.sort(values[str_pos])
except TypeError as e:
raise SortError(e)
strs = np.sort(values[str_pos])
return np.concatenate([nums, np.asarray(strs, dtype=object)])

sorter = None
Expand Down