[Numpy-svn] [numpy/numpy] d619a0: ENH: Split sort source file by sort kind.
GitHub
noreply at github.com
Wed Jul 11 16:53:28 EDT 2012
Branch: refs/heads/master
Home: https://github.com/numpy/numpy
Commit: d619a0d443f1a064cf1e2b48198a17e0fd89849c
https://github.com/numpy/numpy/commit/d619a0d443f1a064cf1e2b48198a17e0fd89849c
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2012-07-11 (Wed, 11 Jul 2012)
Changed paths:
M numpy/core/SConscript
M numpy/core/bento.info
M numpy/core/setup.py
A numpy/core/src/npysort/heapsort.c.src
A numpy/core/src/npysort/mergesort.c.src
A numpy/core/src/npysort/quicksort.c.src
R numpy/core/src/npysort/sort.c.src
Log Message:
-----------
ENH: Split sort source file by sort kind.
The different sort kinds are now located in
quicksort.c.src
mergesort.c.src
heapsort.c.src
Both direct and indirect sorts are included in each file. This cleanup
was done so that additional sorts or quickselect could be added without
undue clutter.
Commit: 286a15f77dbc657e2dfceb0bab35e4891e62b4f7
https://github.com/numpy/numpy/commit/286a15f77dbc657e2dfceb0bab35e4891e62b4f7
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2012-07-11 (Wed, 11 Jul 2012)
Changed paths:
M numpy/core/tests/test_multiarray.py
Log Message:
-----------
ENH: Add tests for object and structured array sorts.
The tests only cover quicksort at this time. This is preparation
for adding type specific sorts of object and structured arrays.
Commit: 5be7e01a6d67f2adeb167a280986547773dc3ce0
https://github.com/numpy/numpy/commit/5be7e01a6d67f2adeb167a280986547773dc3ce0
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2012-07-11 (Wed, 11 Jul 2012)
Changed paths:
M numpy/core/src/multiarray/item_selection.c
M numpy/core/src/npysort/heapsort.c.src
M numpy/core/src/npysort/mergesort.c.src
M numpy/core/src/npysort/npysort_common.h
M numpy/core/src/npysort/quicksort.c.src
M numpy/core/src/private/npy_sort.h
M numpy/core/tests/test_multiarray.py
Log Message:
-----------
ENH: Add generic sorts for quicksort, heapsort, and mergesort.
These all have the same signature as the c qsort apart from an
error return that is needed for memory allocation errors. With
these functions the different kinds of sorts are made available
for types that don't have type specific sorts.
This fixes the np.unique bug introduced in 1.6.2 where record
arrays and such didn't have mergesort. It also allows lexsort to
work with all array types.
Commit: 7036fb3c68d5ad956847e1f65b8630ed97ea8ff7
https://github.com/numpy/numpy/commit/7036fb3c68d5ad956847e1f65b8630ed97ea8ff7
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2012-07-11 (Wed, 11 Jul 2012)
Changed paths:
M numpy/core/tests/test_multiarray.py
Log Message:
-----------
ENH: Make sort tests use prime number of elements.
Commit: 591ed4e51e996ee7151ae025b0a836ae9fe1c0a4
https://github.com/numpy/numpy/commit/591ed4e51e996ee7151ae025b0a836ae9fe1c0a4
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2012-07-11 (Wed, 11 Jul 2012)
Changed paths:
M numpy/core/src/npysort/mergesort.c.src
Log Message:
-----------
ENH: Refactor mergesort so that the code is more consistent.
One small step on the way to a template to rule them all.
Commit: cd3e1e258407ec233139461445e35787ef42088d
https://github.com/numpy/numpy/commit/cd3e1e258407ec233139461445e35787ef42088d
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2012-07-11 (Wed, 11 Jul 2012)
Changed paths:
M numpy/core/src/multiarray/item_selection.c
Log Message:
-----------
BUG: Add include needed for separate compilation.
Commit: 5a929a4875bc3e33d0333d8684d6eeaa0e4d45f4
https://github.com/numpy/numpy/commit/5a929a4875bc3e33d0333d8684d6eeaa0e4d45f4
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2012-07-11 (Wed, 11 Jul 2012)
Changed paths:
M numpy/lib/tests/test_arraysetops.py
Log Message:
-----------
TST: Improve type coverage in test_unique.
Commit: 895ed8195ef917a649b77d678610d60fa4ac8ca4
https://github.com/numpy/numpy/commit/895ed8195ef917a649b77d678610d60fa4ac8ca4
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2012-07-11 (Wed, 11 Jul 2012)
Changed paths:
M numpy/lib/tests/test_arraysetops.py
Log Message:
-----------
BUG: test_unique needs to test bigger arrays.
Small arrays are sorted with insertion sort, which is a stable
sort. Consequently larger arrays are needed to check that the
sort used is properly stable.
The test was also refactored to make it more compact.
Commit: 76d5ae80dc0fc212ee0a8962bc7f83dae274668f
https://github.com/numpy/numpy/commit/76d5ae80dc0fc212ee0a8962bc7f83dae274668f
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2012-07-11 (Wed, 11 Jul 2012)
Changed paths:
M numpy/core/src/npysort/mergesort.c.src
Log Message:
-----------
UPD: Replace PyDataMem_{NEW,FREE} by malloc and free.
PyDataMem_{NEW,FREE} are part of the numpy api after 8ecb4b23
and that fits poorly with the sort library. This means a fair
amount of memory usage may go untracked due to the work array
needed by mergesort.
Commit: f4c47a5e366d39f225a19db78010d9785dd801de
https://github.com/numpy/numpy/commit/f4c47a5e366d39f225a19db78010d9785dd801de
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2012-07-11 (Wed, 11 Jul 2012)
Changed paths:
M numpy/core/SConscript
M numpy/core/bento.info
M numpy/core/setup.py
M numpy/core/src/multiarray/item_selection.c
A numpy/core/src/npysort/heapsort.c.src
A numpy/core/src/npysort/mergesort.c.src
M numpy/core/src/npysort/npysort_common.h
A numpy/core/src/npysort/quicksort.c.src
R numpy/core/src/npysort/sort.c.src
M numpy/core/src/private/npy_sort.h
M numpy/core/tests/test_multiarray.py
M numpy/lib/tests/test_arraysetops.py
Log Message:
-----------
Merge pull request #339 from charris/generic-sorts
Add generic versions of heapsort and mergesort so that those sorts will be available to all numpy types. The generic versions are probably not as fast as the type specific versions, but they will always be there.
Compare: https://github.com/numpy/numpy/compare/8ecb4b23bcef...f4c47a5e366d
More information about the Numpy-svn
mailing list