Skip to content

Commit e15a0ca

Browse files
committed
DOCTEST: Delete reference to mmap data to avoid warning
1 parent 0b79a03 commit e15a0ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nibabel/externals/netcdf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ class netcdf_file(object):
228228
to be copied to main memory:
229229
230230
>>> data = time[:].copy()
231+
>>> del time # References to mmap'd objects can delay full closure
231232
>>> f.close()
232233
>>> data.mean()
233234
4.5
@@ -240,7 +241,7 @@ class netcdf_file(object):
240241
241242
Delete our temporary directory and file:
242243
243-
>>> del f, time # needed for windows unlink
244+
>>> del f # needed for windows unlink
244245
>>> os.unlink(fname)
245246
>>> os.rmdir(tmp_pth)
246247
"""

0 commit comments

Comments
 (0)