row = np.array([0, 3, 1, 0])
col = np.array([0, 2, 3, 2])
data = np.array([-3, 4, 11, -7])
A = coo_matrix((data, (row, col)), shape=(4, 4))
print(A.toarray())
nrRows = A.shape[0]
maxrowind = []
for i in range(nrRows):
    r = A.getrow(i)
maxrowind.append(r.indices[r.data.argmax()] if r.nnz else 0)
print(maxrowind)
Argmax of each row or column in scipy sparse matrix