Continued the note using scipy sparse matrices. Image dimensions are less of an issue (by a lot).