Created
July 10, 2017 10:20
-
-
Save mp4096/e9e69a0db0c95b859cf2f471e4bc910d to your computer and use it in GitHub Desktop.
Store and load Python objects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import joblib | |
a = 1 | |
b = "hello" | |
c = 2.71828 | |
# The `compress` argument is optional; | |
# 9 is the highest compression level | |
joblib.dump((a, b, c), "foo.xz", compress=9) | |
print(joblib.load("foo.xz")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment