I want to add elements to array print output. What I have done is like that(from 'Fallen Apart' my last post):
c = np.arange(9).reshape(3,3)
for i, row in enumerate(c):
print('G' + str(i+1) + ': ' + str(row))
Result:
G1: [0 1 2]
G2: [3 4 5]
G3: [6 7 8]
What I want to do is to print like this:
G1: [1:0 2:1 3:2]
G2: [1:3 2:4 3:5]
G3: [1:6 2:7 3:8]
Anyone can help me with it? THanks!
[1:0 2:1 3:2], could you please clarify what you mean by that?1:, 2: ,3:...in sequence before each value of each row in this array.[1:0 2:1 3:2]is what I want