Skip to content

anonymous /gist:578226

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
import scipy.sparse
import scipy.io.mmio
import os
import gc
import time
import numpy
matrix = scipy.io.mmio.mmread(os.popen("cat sparse_matrix.head try3"))
mat2 = matrix.tocsc()
numpy.savez('foo.npz', mat=mat2)
norms = numpy.zeros((1,mat2.shape[1]))
import math
for j in range(0, mat2.shape[1] - 1):
if (j % 10000 == 0):
print('j is', j)
c = mat2.getcol(j)
norms[0, j] = scipy.linalg.norm(c.A)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.