[Matrix-SIG] Limiting size of arrays printed by Numeric

Joe Van Andel vanandel@ucar.edu
Fri, 23 Jul 1999 14:46:43 -0600


I'm writing a radar data processing system that uses fairly large
arrays.  (360 x 900).  When I have a list or dictionary that contains
such an array, I frequently want to see just the size and type of the
array,
 without getting all the content printed by the default repr() function. 
Otherwise, using Numeric Python interactively is rather awkward, since
you never know when you may end up accidently printing out some enormous
(Megabytes!) amount of data.


 Has anyone over-ridden the repr() function to have thresholds that
would print "small" arrays as usual, but would print large arrays as
something like:

array(500x300, FLOAT)

How do I over-ride the built in function?  Once I over-ride it, how do I
access the original built-in function?

Thanks much, I appreciate your help.


-- 
Joe VanAndel  	          
National Center for Atmospheric Research
http://www.atd.ucar.edu/~vanandel/
Internet: vanandel@ucar.edu