How to implement double indexing in a 2D sparse scipy matrix?
Suppose I have a 2D sparse matrix M representing the results of 2-on-2
basketball matches. I want to use address the elements of the matrix using
double-indexing : Element M[i,j][k,l] will represent the score of the game
played by a team of players i and j against team k and l. Thus, each
column/row is specified by two numbers instead of one. Note that this is
not a 4D matrix. I'm looking for a way to do this with a sparse SciPy
matrix in order to be able to perform various matrix-related calculations
(eigenvalues/vectors, etc).
No comments:
Post a Comment