[Idle-dev] [ idlefork-Bugs-558687 ] Printing arrays misses elements

noreply@sourceforge.net noreply@sourceforge.net
Tue, 21 May 2002 07:10:15 -0700


Bugs item #558687, was opened at 2002-05-21 14:10
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=109579&aid=558687&group_id=9579

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Williams (mikewilliams)
Assigned to: Nobody/Anonymous (nobody)
Summary: Printing arrays misses elements

Initial Comment:
IDLEfork seems to be missing out an inconsistent 
number of the final few elements of a Numeric 
array when asked to print them. This has been 
replicated on both Linux and Solaris with 
Python2.2.1 and IDLEfork 0.8.1

Consider the following code snippet (problem 
exhibited both if run from module or typed at 
shell):

from Numeric import *   #Import Numeric (an array  
                          #library)
xx = zeros(100, Float)  #Create an empty array of  
                          #100 floats
for i in range(100):    
    xx[i] = i           #Put numbers 0 to 99 in 
the                          #array
print xx                #Print the array (see the  
                          #problem?)
print xx[99]            #Although xx[99] does 
exist!

This problem doesn't seem to occur much below 100 
element arrays (although see, e.g. 87), but seems 
to get more severe above it. See, for example 
102-108 (not 109 or 110), 150, 200, 1000 (which 
prints the first 947 elements!). I could not find 
a corellation between window width and the number 
of elements that were printed (which appears to be 
constant). Ther seems to be some reluctance to 
start a new line when printing until there are 
sufficient elements to put on it.

This is a medium severity problem, especially for 
interactive work.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=109579&aid=558687&group_id=9579