I have a list of numpy arrays. Each array holds the value for the column I need there to be a 1 in a sparse binary matrix. The order in which the numpy array appears in the list is the value for the row for all the values in that respective numpy array. I am trying to use scipy.sparse.csr_matrix to do this. So I need two numpy arrays one for the column indices and the other for the row indices. Here is an example of what I need:
a = np.array([1, 2, 3, 4, 5, 6])
b = np.array([10, 11, 12])
c = np.array([60, 100])
d = [a, b, c]
column = np.array([1, 2, 3, 4, 5, 6, 10, 11, 12, 60, 100])
row = np.array([0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2])