[Numpy-discussion] repr for numarray

Scott Ransom ransom at physics.mcgill.ca
Tue Jun 11 11:54:07 EDT 2002

On June 11, 2002 02:43 pm, Perry Greenfield wrote:

> Yet on the other hand, it is undeniably convenient to use
> repr (by typing a variable) for small arrays interactively
> rather than using a print statement. This leads to 3 possible
> proposals for handling repr:
> 1) Do what is done now, always print a string that when
> eval'ed will recreate the array.
> 2) Only give summary information for the array regardless of
> its size.
> 3) Print the array if it has fewer than THRESHOLD number of
> elements, otherwise print a summary. THRESHOLD may be adjusted
> by the user.
> The last appears to be the most utilitarian to us, yet
> 'impure' somehow.  Certainly there are may objects for which

I vote for number 3, and have no hang-ups about any real or perceived 
"impurity".  This is an issue that I deal with daily.


Scott M. Ransom              Address:  McGill Univ. Physics Dept.
Phone:  (514) 398-6492                 3600 University St., Rm 338
email:  ransom at physics.mcgill.ca       Montreal, QC  Canada H3A 2T8 
GPG Fingerprint: 06A9 9553 78BE 16DB 407B  FFCA 9BFA B6FF FFD3 2989

More information about the NumPy-Discussion mailing list