See all values in an array

4

I would like to know how I can see all the values in an array when I do print. Give me this:

ber_MFSK        = M/2*qfunc(np.sqrt(k*ebno_theory))
print(ber_MFSK)

And give me this:

[  1.58655254e-01   1.30927297e-01   1.04028637e-01 ...,   7.82701129e-04
   1.93985472e-04   3.43026239e-05]

How can I see the other values

    
asked by anonymous 09.10.2017 / 21:00

1 answer

4

NumPy Arrays often "summarize" the display of large content and control this by setting a threshold (limit) that can be set using the set_printoptions() method.

To display a NumPy Array never is briefly displayed you can do something like:

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

Display arrays of up to 10 elements without summarizing content:

import numpy as np
np.set_printoptions( threshold=10 )
print(np.arange(10))

Output:

[0 1 2 3 4 5 6 7 8 9]

Display arrays of up to 9 elements without summarizing content:

import numpy as np
np.set_printoptions( threshold=9 )
print(np.arange(10))

Output:

[0 1 2 ..., 7 8 9]

Reference:

link

    
09.10.2017 / 21:34