numpy arrays
numpy
Class objects
import numpy as np import pickle X = np.array([0, 1, 2, 3, 4]) pickle_out = open(f"output.pkl", "wb") pickle.dump(X, pickle_out) pickle_out.close()
pickle_object = pickle.load(open("output.pkl", "rb"))
Last updated 4 years ago