views:

550

answers:

2

When I print an array i get the following stuff, but I want the full array. Is there any way to do this? Thanks in advance, and everybody a happy, lucky, successfull new year!

[[0 0 0 ..., 0 0 0]
 [0 0 0 ..., 0 0 0]
 [0 0 0 ..., 0 0 0]
 ..., 
 [0 0 0 ..., 0 0 0]
 [0 0 0 ..., 0 0 0]
 [0 0 0 ..., 0 0 0]]
+5  A: 

This sounds like you're using numpy.

If that's the case, you can add:

set_printoptions(threshold=nan)

That will disable the corner printing. For more information, see this NumPy Tutorial.

Reed Copsey
+3  A: 

To clarify on Reed's reply

import numpy
numpy.set_printoptions(threshold=numpy.nan)

Note that the reply as given above works with an initial 'from numpy import *', which is not advisable. This also works for me

numpy.set_printoptions(threshold='nan')

For full documentation, see http://docs.scipy.org/doc/numpy/reference/generated/numpy.set_printoptions.html.

Raja