MCPcopy
hub / github.com/WassimTenachi/PhySO / save

Method save

physo/physym/program.py:356–365  ·  view source on GitHub ↗

Saves program as a pickle file.

(self, fpath)

Source from the content-addressed store, hash-verified

354 return history
355
356 def save(self, fpath):
357 """
358 Saves program as a pickle file.
359 """
360 # Detach const data
361 self.detach()
362 # Save
363 with open(fpath, 'wb') as f:
364 pickle.dump(self, f)
365 return None
366 def detach(self):
367 """
368 Detaches program's free constants.

Callers 3

test_pickabilityMethod · 0.95
test_save_single_progMethod · 0.80

Calls 1

detachMethod · 0.95

Tested by 2

test_pickabilityMethod · 0.76
test_save_single_progMethod · 0.64