Skip to content

Commit db7118a

Browse files
committed
DOCTEST: Delete reference to mmap data to avoid warning
1 parent 623344e commit db7118a

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
@@ -223,6 +223,7 @@ class netcdf_file(object):
223223
to be copied to main memory:
224224
225225
>>> data = time[:].copy()
226+
>>> del time # References to mmap'd objects can delay full closure
226227
>>> f.close()
227228
>>> data.mean()
228229
4.5
@@ -235,7 +236,7 @@ class netcdf_file(object):
235236
236237
Delete our temporary directory and file:
237238
238-
>>> del f, time # needed for windows unlink
239+
>>> del f # needed for windows unlink
239240
>>> os.unlink(fname)
240241
>>> os.rmdir(tmp_pth)
241242
"""

0 commit comments

Comments
 (0)