(self, kwargs)
| 349 | {'bitorder': 'big', 'count': None}, |
| 350 | ]) |
| 351 | def test_axis_count(self, kwargs): |
| 352 | packed0 = np.packbits(self.x, axis=0) |
| 353 | unpacked0 = np.unpackbits(packed0, axis=0, **kwargs) |
| 354 | assert_equal(unpacked0.dtype, np.uint8) |
| 355 | if kwargs.get('bitorder', 'big') == 'big': |
| 356 | assert_array_equal(unpacked0, self.padded2[:-1, :self.x.shape[1]]) |
| 357 | else: |
| 358 | assert_array_equal(unpacked0[::-1, :], self.padded2[:-1, :self.x.shape[1]]) |
| 359 | |
| 360 | packed1 = np.packbits(self.x, axis=1) |
| 361 | unpacked1 = np.unpackbits(packed1, axis=1, **kwargs) |
| 362 | assert_equal(unpacked1.dtype, np.uint8) |
| 363 | if kwargs.get('bitorder', 'big') == 'big': |
| 364 | assert_array_equal(unpacked1, self.padded2[:self.x.shape[0], :-1]) |
| 365 | else: |
| 366 | assert_array_equal(unpacked1[:, ::-1], self.padded2[:self.x.shape[0], :-1]) |
| 367 | |
| 368 | def test_bad_count(self): |
| 369 | packed0 = np.packbits(self.x, axis=0) |
nothing calls this directly
no test coverage detected