Original ticket http://projects.scipy.org/numpy/ticket/2188 on 2012-07-23 by @yarikoptic, assigned to unknown.
tested against current master (present in 1.6.2 as well):
If with python2.x series it works ok, without puking:
$> python2.7 -c 'import numpy as np; print repr(repr(np.unique(np.array([1,2, None, "str"]))))'
'array([None, 1, 2, str], dtype=object)'
NB I will report a bug on repr here separately if not yet filed
it fails with python3.x altogether:
$> python3.2 -c 'import numpy as np; print(repr(repr(np.unique(np.array([1,2,None, "str"])))))'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.2/dist-packages/numpy/lib/arraysetops.py", line 194, in unique
ar.sort()
TypeError: unorderable types: int() > NoneType()
whenever IMHO it must operate correctly -- semantic of unique() action should not imply ability to sort the elements
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4