[Tutor] IndexError: index out of bounds

Sayan Chatterjee sayanchatterjee at gmail.com
Wed Mar 27 16:50:08 CET 2013


Dear all,

When trying to print or assign array elements, getting the following error:

Traceback (most recent call last):
  File "ZA.py", line 32, in <module>
    p_za[i] = p_initial[i] + t*K*cos(K*p_initial[i]);
IndexError: index out of bounds

I am using Numpy, is it due to that? I am attaching the code herewith.



-- 


--------------------------------------------------------------------------
*Sayan  Chatterjee*
Dept. of Physics and Meteorology
IIT Kharagpur
Lal Bahadur Shastry Hall of Residence
Room AB 205
Mob: +91 9874513565
blog: www.blissprofound.blogspot.com

Volunteer , Padakshep
www.padakshep.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130327/c3cd243f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ZA.py
Type: application/octet-stream
Size: 1180 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/tutor/attachments/20130327/c3cd243f/attachment.obj>


More information about the Tutor mailing list