(self)
| 188 | assert_(fp[[0, 1]].__class__ is ndarray) |
| 189 | |
| 190 | def test_memmap_subclass(self): |
| 191 | class MemmapSubClass(memmap): |
| 192 | pass |
| 193 | |
| 194 | fp = MemmapSubClass(self.tmpfp, dtype=self.dtype, shape=self.shape) |
| 195 | fp[:] = self.data |
| 196 | |
| 197 | # We keep previous behavior for subclasses of memmap, i.e. the |
| 198 | # ufunc and __getitem__ output is never turned into an ndarray |
| 199 | assert_(sum(fp, axis=0).__class__ is MemmapSubClass) |
| 200 | assert_(sum(fp).__class__ is MemmapSubClass) |
| 201 | assert_(fp[1:, :-1].__class__ is MemmapSubClass) |
| 202 | assert fp[[0, 1]].__class__ is MemmapSubClass |
| 203 | |
| 204 | def test_mmap_offset_greater_than_allocation_granularity(self): |
| 205 | size = 5 * mmap.ALLOCATIONGRANULARITY |
nothing calls this directly
no test coverage detected