I have two arrays
a = np.array[1,18,3,13,6,45,45]
b= np.array [8,13,6,45,45]
after doing some matching exercises I have a list, such as:
[3,1,4]
first and second number of the list are zero based. the third number is not. the list stands for
start position of first array
start position of second array
how many numbers rows to retrieve
so for this example the result would be
13, 13
6,6
45,45
45,45
Both starting points of the array and then get 4 rows after that.
How can I merge my two arrays using my matchlist?
EDIT This is the matchlist that I am using:
matchlist2 = []
matchlist2.append([3,1,4])
matchlist2.append([9,7,731])
matchlist2.append([766,762,19])
matchlist2.append([800,796,57])
matchlist2.append([867,862,88])
matchlist2.append([960,955,468])
matchlist2.append([1432,1427,65])
matchlist2.append([1523,1518,341])
matchlist2.append([1873,1868,32])
matchlist2.append([1923,1916,82])
matchlist2.append([2011,2004,699])
matchlist2.append([2716,2707,902])
matchlist2.append([3628,3617,247])
matchlist2.append([3923,391,378])
matchlist2.append([4306,4292,5])
l = [3,1,4]:a[l[0]:l[0]+l[2]] , b[l[1]:l[1]+l[2]]?