Hello,
I am a programmer, but not a python guy. So I am a little confused with
the following python code. Specifically what does the ":" do in the
array arithmetic?

    new_page = map[opage]
    old_page = map[opage^1]


    center = new_page[1:-1,1:-1]
    origcenter = array(center)
    center[:] = old_page[2:,2:]

    center += old_page[1:-1,2:]
    center += old_page[:-2,2:]
    center += old_page[2:,1:-1]
    center += old_page[:-2,1:-1]
    center += old_page[2:,:-2]
    center += old_page[1:-1,:-2]
    center += old_page[:-2,:-2]
    center >>= 2
    center -= origcenter
    center -= (center>>density)



Thanks!!
Randy

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to