MCPcopy Create free account
hub / github.com/numpy/numpy / _dump

Function _dump

numpy/core/_methods.py:225–231  ·  view source on GitHub ↗
(self, file, protocol=2)

Source from the content-addressed store, hash-verified

223 )
224
225def _dump(self, file, protocol=2):
226 if hasattr(file, 'write'):
227 ctx = nullcontext(file)
228 else:
229 ctx = open(os_fspath(file), "wb")
230 with ctx as f:
231 pickle.dump(self, f, protocol=protocol)
232
233def _dumps(self, protocol=2):
234 return pickle.dumps(self, protocol=protocol)

Callers

nothing calls this directly

Calls 1

openFunction · 0.85

Tested by

no test coverage detected