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