I am trying to subsample a scipy sparse matrix as a numpy matrix like this to get every 10th row and every 10th column:
connections = sparse.csr_matrix((data,(node1_index,node2_index)),
shape=(dimensions,dimensions))
connections_sampled = np.zeros((dimensions/10, dimensions/10))
connections_sampled = connections[::10,::10]
However, when I run this and and query the shape of connections_sampled, I get the original dimensions of connections instead of dimensions that have been reduced by a factor of 10.
Does this type of subsampling now work with sparse matrices? It seems to work when I use smaller matrices, but I can't get this to give the correct answer.