(self, dtype, axis, expected)
| 1086 | (1, np.array([[ 5, 3, 4, 0, 2, 1], |
| 1087 | [11, 9, 10, 6, 8, 7]]))]) |
| 1088 | def test_permuted(self, dtype, axis, expected): |
| 1089 | random = Generator(MT19937(self.seed)) |
| 1090 | x = np.arange(12).reshape(2, 6).astype(dtype) |
| 1091 | random.permuted(x, axis=axis, out=x) |
| 1092 | assert_array_equal(x, expected) |
| 1093 | |
| 1094 | random = Generator(MT19937(self.seed)) |
| 1095 | x = np.arange(12).reshape(2, 6).astype(dtype) |
| 1096 | y = random.permuted(x, axis=axis) |
| 1097 | assert y.dtype == dtype |
| 1098 | assert_array_equal(y, expected) |
| 1099 | |
| 1100 | def test_permuted_with_strides(self): |
| 1101 | random = Generator(MT19937(self.seed)) |
nothing calls this directly
no test coverage detected