Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #33602
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeeder.ewetel.de!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <insideshoes@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.006 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'else:': 0.03; 'error:': 0.05; 'subject:Error': 0.07; 'def': 0.10; 'index': 0.13; '0.0,': 0.16; '1000):': 0.16; 'dist': 0.16; 'idx': 0.16; 'received:209.85.216.53': 0.16; 'skip:\xa0 60': 0.16; '<': 0.17; 'skip:\xa0 30': 0.17; 'changes': 0.20; 'skip:" 30': 0.20; 'to:name:python-list@python.org': 0.20; 'meant': 0.21; 'statement': 0.23; 'header:In-Reply-To:1': 0.25; '(most': 0.27; 'message-id:@mail.gmail.com': 0.27; 'points': 0.29; 'skip:& 10': 0.29; 'error': 0.30; 'point': 0.31; 'file': 0.32; 'print': 0.32; 'traceback': 0.33; 'to:addr:python-list': 0.33; 'another': 0.33; 'received:google.com': 0.34; 'false': 0.35; 'continue': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'skip:p 20': 0.36; 'does': 0.37; 'received:209': 0.37; 'received:209.85.216': 0.37; 'subject:: ': 0.38; 'mean': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'range': 0.60; '8bit%:100': 0.70; '71,': 0.84; '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0': 0.84; 'exceeded': 0.97 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=XbtX2C1LEI8yfYrXBPxnyiqbZaWJZd4xAB+5d5vkbAE=; b=TZ+2o7Eo2W7sroXm7LcLHm+yEVktkz7nnW0q9QYey79YsZcfRscusZUbJAl7uFbE36 6kqZWParKC/PAuR+rPKvs0u7QBDY+jTXTCtD5eROh2okIi1eOgTPbeCYtaXLhQ0bYssk VR//rGsCPlSO2Z6uq4RvELhE4QeUWNO05rA1FrfUGEmXIpbulKxwsnpHJwiwvvEYTzaw f+CpRtmPACHSDDUBrd1yi+sZklBPypmTZX15R2W/UC3V0GZRmCOTfd0Lvd92vHTWjAZd ixTlBB1kR5WN/iA4BzP0DhJ92cEArmMe7xTr39AP6NmV7UreMEFXt81ti97MqacjN3EH dHWA== |
| MIME-Version | 1.0 |
| In-Reply-To | <CAFqGZRFmj7+HoYn-t_kD-Sf9y6WOA3PJAqYjTEnz5PO+HzcDBw@mail.gmail.com> |
| References | <CAFqGZRGYDM_3H657gid9GUxrSbnM_92nCZEsWWcWhFua5xEpmw@mail.gmail.com> <50A3E794.7080900@mrabarnett.plus.com> <CAFqGZRFmj7+HoYn-t_kD-Sf9y6WOA3PJAqYjTEnz5PO+HzcDBw@mail.gmail.com> |
| Date | Tue, 20 Nov 2012 13:31:42 +0100 |
| Subject | Re: Error |
| From | inshu chauhan <insideshoes@gmail.com> |
| To | "python-list@python.org" <python-list@python.org> |
| Content-Type | multipart/alternative; boundary=047d7b6d89e8900f5104ceec6a3a |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.43.1353414710.29569.python-list@python.org> (permalink) |
| Lines | 104 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1353414710 news.xs4all.nl 6988 [2001:888:2000:d::a6]:49298 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:33602 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
I did the following changes in this part of my programme.. now the
refereence error is removed but its showing me another error :
def ComputeClasses(data):
radius = .5
points = []
for cy in xrange(0, data.height):
for cx in xrange(0, data.width):
if data[cy,cx] == (0.0,0.0,0.0):
continue
else :
centre = data[cy, cx]
print centre
points.append(centre)
change = True
while change:
for ring_number in xrange(1, 1000):
change = False
new_indices = GenerateRing(cx, cy, ring_number)
for idx in new_indices:
point = data[idx[0], idx[1]]
if point == (0.0, 0.0, 0.0 ):
continue
else:
dist = distance(centre, point)
if dist < radius :
print point
points.append(point)
change = True
print change
break
print points
ERROR :
Traceback (most recent call last):
File "Z:/modules/classification1.py", line 71, in <module>
ComputeClasses(data)
File "Z:/modules/classification1.py", line 47, in ComputeClasses
point = data[idx[0], idx[1]]
error: index is out of range
What is meant by this statement ' Index out of range ' ? Does it mean that
my range 1, 1000 is exceeded ??
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Error inshu chauhan <insideshoes@gmail.com> - 2012-11-20 13:31 +0100
csiph-web