It seems that the pypng module allows saving images made of lists of lists of channels (instead than lists of lists of triples), and that this takes some time less than saving the usual format used at lesson.
We want that all students that participate to the "efficiency game" start at the same level, and therefore we think that using the flat pixel format for saving gives a time advantage that has nothing to do with writing an efficient solution to the HW6req problem.
After a thorough discussion with the other 3 colleagues, we found ourselves cosidering these two options:
- insert some assertions in the images.save function so that all cases where the images is not a list of lists of triples would fail
- this means considering in bad faith all those that have used this trick (that is reasonable, given the fact that in thread https://q2a.di.uniroma1.it/23738/idee-per-velocizzare-images-save-in-hw-6 I said that optimizing the save function was not allowed, but that suggesting how to improve the save function for everybody was allowed. And this did not happen).
- else add to images.save a check to detect the images in the wrong format and transform them to lists-of-lists-of-triples, so that everybody plays the "optimization game" in the same way
- this means considering you all in good faith, and brings back the game to fairness
After a long and detailed discussion we have decided unanimously to apply the second option. The HW6req tests will be re-re-run as soon the images library will be updated on the VM.
Andrea, Iacopo, Maurizio, Angelo
PS. for the cases, instead, where the png module has been used directly (either by from images import png or by using images.png), this is a forbidden use of another module. The images module will be changed (by renaming png) so that this case will fail.