How do I print a numpy array?

Robert Kern robert.kern at gmail.com
Fri Dec 1 18:08:54 EST 2006


Grant Edwards wrote:
> How do you print a numpy array?
> 
> I tried the obvious print a, print `a`, and print str(a), but
> none of them work on anything other than trivially small
> arrays.  Most of my real data is elided and replaced with
> ellipses.

You might want to ask numpy questions on the numpy list:

  http://www.scipy.org/Mailing_Lists

Use numpy.set_printoptions(threshold=sys.maxint) to disable all summarization.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco




More information about the Python-list mailing list