I want to print all non zeros values of scipy sparse matrix, but it's print only head and tail of the values.
I have tried to use numpy as well as scipy set_printoptions, but it's not make any changes.
For example:
np.set_printoptions(threshold=np.inf, linewidth=np.inf, precision=5)
print(S_0)
When S_0 is a sparse matrix 4096 by 4096.
It's print:
(0, 1) 0.05473236104737437
(0, 63) 0.21776763895262571
(0, 64) 0.11669233874304108
(0, 65) 0.07099307125265637
(0, 127) 0.16239160623342577
(0, 4032) 0.15580766125695897
(0, 4033) 0.03847165084209235
(0, 4095) 0.27314367167182557
(0, 0) -0.09000000000000008
(1, 1) 1.0
(2, 1) 0.03201451256475778
(2, 3) 0.2404854874352423
(2, 65) 0.03313570631258726
(2, 66) 0.2433307472199537
(2, 67) 0.45352578812732014
(2, 4033) 0.03089331881692829
(2, 4034) 0.029169252780046343
(2, 4035) 0.027445186743164394
(2, 2) -0.09000000000000008
(3, 3) 1.0
(4, 3) 0.1780272480832952
(4, 5) 0.09447275191670479
(4, 67) 0.09857505006040893
(4, 68) 0.10065942747216487
(4, 69) 0.10274380488392083
: :
(4071, 4071) 1.0
(4072, 4072) 1.0
(4073, 4073) 1.0
(4074, 4074) 1.0
(4075, 4075) 1.0
(4076, 4076) 1.0
(4077, 4077) 1.0
(4078, 4078) 1.0
(4079, 4079) 1.0
(4080, 4080) 1.0
(4081, 4081) 1.0
(4082, 4082) 1.0
(4083, 4083) 1.0
(4084, 4084) 1.0
(4085, 4085) 1.0
(4086, 4086) 1.0
(4087, 4087) 1.0
(4088, 4088) 1.0
(4089, 4089) 1.0
(4090, 4090) 1.0
(4091, 4091) 1.0
(4092, 4092) 1.0
(4093, 4093) 1.0
(4094, 4094) 1.0
(4095, 4095) 1.0
I want it to print all the values
Any ideas?