Skip to content

Instantly share code, notes, and snippets.

@bmorris3
Created October 7, 2013 17:46
Show Gist options
  • Save bmorris3/6871989 to your computer and use it in GitHub Desktop.
Save bmorris3/6871989 to your computer and use it in GitHub Desktop.
import numpy as np
import cPickle
import os
data = np.random.random(10)
## Simulate behavior of oscaar.IO.save()
outputName = "null\\0test.pkl"
output = open(outputName, 'wb')
cPickle.dump(data, output)
output.close()
## Simulate behavior of oscaar.IO.load()
inputPath = "null\0test.pkl"
print inputPath
inputFile = open(inputPath, 'rb')
data_loaded = cPickle.load(inputFile)
inputFile.close()
print "Data loaded successfully\n",data_loaded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment