(self)
| 2240 | assert_raises(TypeError, arr.sort, kind=kind) |
| 2241 | |
| 2242 | def test_sort_degraded(self): |
| 2243 | # test degraded dataset would take minutes to run with normal qsort |
| 2244 | d = np.arange(1000000) |
| 2245 | do = d.copy() |
| 2246 | x = d |
| 2247 | # create a median of 3 killer where each median is the sorted second |
| 2248 | # last element of the quicksort partition |
| 2249 | while x.size > 3: |
| 2250 | mid = x.size // 2 |
| 2251 | x[mid], x[-2] = x[-2], x[mid] |
| 2252 | x = x[:-2] |
| 2253 | |
| 2254 | assert_equal(np.sort(d), do) |
| 2255 | assert_equal(d[np.argsort(d)], do) |
| 2256 | |
| 2257 | def test_copy(self): |
| 2258 | def assert_fortran(arr): |
nothing calls this directly
no test coverage detected