(self, dtype)
| 113 | self._validateTopK(inputs, 1, [[np.NaN], [np.NaN]], [[0], [0]]) |
| 114 | |
| 115 | def _testLargeSort(self, dtype): |
| 116 | b = 10 |
| 117 | n = 5000 |
| 118 | inputs = np.random.permutation( |
| 119 | np.linspace(0, 100, b * n, dtype=dtype)).reshape(b, n) |
| 120 | indices = np.argsort(-inputs, axis=1) |
| 121 | values = -np.sort(-inputs, axis=1) |
| 122 | self._validateTopK(inputs, n, values, indices) |
| 123 | |
| 124 | def testLargeSort(self): |
| 125 | self._testLargeSort(np.float32) |
no test coverage detected