import numpy as np acc = [ [1, 0, 1, 1, 0, 0, 1, 0, 0], [0, 0, 0, 0, 1, 2, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 1, 3] ] acc = np.asarray(acc) print(acc)