error

inshu chauhan insideshoes at gmail.com
Tue Nov 6 13:31:34 CET 2012


I am getting this error while running my programme.. :

error: index is out of range

 I cannot find a valid reason for it in my prog can somebody suggest what
may be possible reasons for this error..

The part of the code is :

def addpoints (data, points, ix, iy): # makes a list of relevant points
    if 0 < ix < data.width and 0 < iy < data.height:
        point = data[ix, iy]
        if point != (0.0, 0.0, 0.0):
            points.append(point)
    return points

for dx in xrange(-mask_size2, mask_size2 + 1):
        for dy in xrange(-mask_size2, mask_size2 + 1):
            ix, iy = x + dx, y + dy
            addpoints(data, points, ix , iy )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20121106/afd646bc/attachment.html>


More information about the Python-list mailing list