Here is a function I found here to split a normal array into two arrays. In the for loop, we split every one of the arrays in the matrix with the function. When you want to get the first part change the 1 to a 0.
from tabulate import tabulate
def split_list(a_list):
half = len(a_list)//2
return a_list[:half], a_list[half:]
matrix=[[1,2,3,4],[5,6,7,8]]
new_matrix = []
for arr in matrix:
new_matrix.append(split_list(arr)[1]) #Replace this 1 with a 0
print(tabulate(new_matrix))
or just
from tabulate import tabulate
def split_list(a_list):
half = len(a_list)//2
return a_list[:half], a_list[half:]
matrix=[[1,2,3,4],[5,6,7,8]]
new_matrix = split_list(matrix[1])
print(tabulate(new_matrix))