i have the following function
import numpy as np
a = [['a','b','c'],['d','e','f'],['g','h','i'],['j','k','l']]
b = np.array(a)
def func01(matrix):
m,n = np.shape(matrix)
for jump in range (m-1):
for row in range (jump):
for col in range (n):
print (matrix[row][col],matrix[row+jump][col])
func01(b)
this results in:
('a', 'd') ('b', 'e') ('c', 'f') ('a', 'g') ('b', 'h') ('c', 'i') ('d', 'j') ('e', 'k') ('f', 'l')
however i want my result to look like this:
('a', 'd') ('b', 'e') ('c', 'f') ('a', 'g') ('b', 'h') ('c', 'i') ('a', 'j') ('b', 'k') ('c', 'l') ('d', 'g') ('e', 'h') ('f', 'i') ('d', 'j') ('e', 'k') ('f', 'l') ('g', 'j') ('h', 'k') ('i', 'l')
What have I done wrong? Sorry for my bad English