Class not found when trying to save sparse matrix