Daniel Fetchinson wrote:
I agree that array.array is more efficient than a list but the input for my function will come from PIL and PIL returns a list. So I have a list to begin with which will be passed to the C function.
With recent versions of PIL, numpy can create an array from an Image very quickly, possibly without any copying of memory.
-- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list