[Numpy-svn] [numpy/numpy] 14fc78: BUG: gh-2785, np.unique: TypeError: requested sort...

GitHub noreply at github.com
Wed Dec 5 08:21:11 EST 2012


  Branch: refs/heads/maintenance/1.6.x
  Home:   https://github.com/numpy/numpy
  Commit: 14fc78319e1b61cb2806be7059f78d03a02bc7f7
      https://github.com/numpy/numpy/commit/14fc78319e1b61cb2806be7059f78d03a02bc7f7
  Author: Bradley M. Froehle <brad.froehle at gmail.com>
  Date:   2012-12-04 (Tue, 04 Dec 2012)

  Changed paths:
    M numpy/core/tests/test_regression.py
    M numpy/lib/arraysetops.py

  Log Message:
  -----------
  BUG: gh-2785, np.unique: TypeError: requested sort not available for type

Revert "BUG: ticket #2063, make unique return consistent index."

This reverts commit 74b9f5eef8fac643bf9012dbb2ac6b4b19f46892.

Conflicts:
	numpy/core/tests/test_regression.py

This commit introduced a regression in `np.unique` for certain data types:

  >>> A = np.array([[1, 2], [1, 3], [1, 2]], dtype='i')
  >>> B, I, J = np.unique(A.view([('', A.dtype)]*A.shape[1]), True, True)
  Traceback (most recent call last):
    File ".../numpy/lib/arraysetops.py", line 178, in unique
      perm = ar.argsort(kind='mergesort')
  TypeError: requested sort not available for type


  Commit: 46e3b4cc9d9101ceaafffc6bb8faafee1bdc5fc9
      https://github.com/numpy/numpy/commit/46e3b4cc9d9101ceaafffc6bb8faafee1bdc5fc9
  Author: Bradley M. Froehle <brad.froehle at gmail.com>
  Date:   2012-12-04 (Tue, 04 Dec 2012)

  Changed paths:
    M numpy/core/tests/test_regression.py

  Log Message:
  -----------
  TST: Add test for gh-2785.

Ensure that np.unique works on data types with special comparators.


  Commit: 3f5862193a6085a4d59f4dde8d006670a24cae04
      https://github.com/numpy/numpy/commit/3f5862193a6085a4d59f4dde8d006670a24cae04
  Author: njsmith <njs at pobox.com>
  Date:   2012-12-05 (Wed, 05 Dec 2012)

  Changed paths:
    M numpy/core/tests/test_regression.py
    M numpy/lib/arraysetops.py

  Log Message:
  -----------
  Merge pull request #2787 from bfroehle/unique_argsort

np.unique: TypeError: requested sort not available for type


Compare: https://github.com/numpy/numpy/compare/023e559eda10...3f5862193a60


More information about the Numpy-svn mailing list