[Numpy-discussion] repr for numarray
tim.hochberg at ieee.org
Tue Jun 11 12:30:02 EDT 2002
I would also be inclined toward option 3 with the caveat that THRESHOLD=None
should print all the values for the purists out there (or if you want to use
repr to dump the array to some sort of flat file).
> 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
> Multimillion Dollar Computer Inventory
> Live Webcast Auctions Thru Aug. 2002 -
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
More information about the NumPy-Discussion