Skip to content

np.array.sort breaks on mixed types in 1.13.0 #9236

@erbian

Description

@erbian

To reproduce:

import numpy as np
np.array([1,'a',2,'b'], dtype=object).sort()

result:

TypeError: '>' not supported between instances of 'str' and 'int'
INSTALLED VERSIONS ------------------ commit: 94c6b0fc59dc83c9d6a78ac7856025e65ebe35aa python: 3.6.1.final.0 python-bits: 64 OS: Linux OS-release: 3.13.0-107-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8

pandas: 0.21.0.dev+149.g94c6b0f
pytest: 3.1.1
pip: 9.0.1
setuptools: 27.2.0
Cython: 0.25.2
numpy: 1.13.0
scipy: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
pandas_gbq: None
pandas_datareader: None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions