MCPcopy Index your code
hub / github.com/numpy/numpy / close

Method close

numpy/lib/_npyio_impl.py:216–227  ·  view source on GitHub ↗

Close the file.

(self)

Source from the content-addressed store, hash-verified

214 self.close()
215
216 def close(self):
217 """
218 Close the file.
219
220 """
221 if self.zip is not None:
222 self.zip.close()
223 self.zip = None
224 if self.fid is not None:
225 self.fid.close()
226 self.fid = None
227 self.f = None # break reference cycle
228
229 def __del__(self):
230 self.close()

Callers 15

__exit__Method · 0.95
__del__Method · 0.95
find_functionsFunction · 0.45
test_dtype_copyMethod · 0.45
add_closeFunction · 0.45
test_close_raisesFunction · 0.45
teardown_methodMethod · 0.45
test_largish_fileMethod · 0.45
test_mmap_closeMethod · 0.45
test_asyncio_safeMethod · 0.45

Calls

no outgoing calls

Tested by 15

test_dtype_copyMethod · 0.36
add_closeFunction · 0.36
test_close_raisesFunction · 0.36
teardown_methodMethod · 0.36
test_largish_fileMethod · 0.36
test_mmap_closeMethod · 0.36
test_asyncio_safeMethod · 0.36
test_py3_compatMethod · 0.36
valid_textfileFunction · 0.36