Returns an array with blocks that are all sorted.
(size, dtype, block_size, rnd)
| 211 | @staticmethod |
| 212 | @memoize |
| 213 | def sorted_block(size, dtype, block_size, rnd): |
| 214 | """ |
| 215 | Returns an array with blocks that are all sorted. |
| 216 | """ |
| 217 | a = SortGenerator.ordered_range(size, dtype=dtype) |
| 218 | b = [] |
| 219 | if size < block_size: |
| 220 | return a |
| 221 | block_num = size // block_size |
| 222 | for i in range(block_num): |
| 223 | b.extend(a[i::block_num]) |
| 224 | return np.array(b) |
| 225 | |
| 226 | |
| 227 | class Sort(Benchmark): |
nothing calls this directly
no test coverage detected