save_npz
scipy.sparse.
- scipy.sparse.save_npz(file, matrix, compressed=True)
Save a sparse matrix or array to a file using
.npzformat.- Parameters:
- file : str or file-like object
Either the file name (string) or an open file (file-like object) where the data will be saved. If file is a string, the extension will be appended to the file name if it is not already there.