Skip to content

Commit

Permalink
remove deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
justincosentino committed Jun 7, 2019
1 parent d6943c5 commit 46b6b91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions experiments/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def save_array(filename, array_dict):
tf.gfile.MakeDirs(filename)

for k, v in array_dict.items():
with tf.gfile.FastGFile(os.path.join(filename, k + ".npy"), "w") as fp:
with tf.gfile.GFile(os.path.join(filename, k + ".npy"), "w") as fp:
np.save(fp, v)


Expand Down Expand Up @@ -71,7 +71,7 @@ def restore_array(filename):

for basename in tf.gfile.ListDirectory(filename):
name = basename.split(".")[0]
with tf.gfile.FastGFile(os.path.join(filename, basename)) as fp:
with tf.gfile.GFile(os.path.join(filename, basename)) as fp:
array_dict[name] = np.load(fp)

return array_dict
Expand Down

0 comments on commit 46b6b91

Please sign in to comment.