Skip to content
Snippets Groups Projects
Commit f867f02f authored by bbauvin's avatar bbauvin
Browse files

Trying to fix segmentation fault

parent db24dca9
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,7 @@ def extractSubset(matrix, usedIndices):
if sparse.issparse(matrix):
newIndptr = np.zeros(len(usedIndices)+1, dtype=np.int16)
oldindptr = matrix.indptr
print oldindptr
for exampleIndexIndex, exampleIndex in enumerate(usedIndices):
newIndptr[exampleIndexIndex+1] = newIndptr[exampleIndexIndex]+(oldindptr[exampleIndex+1]-oldindptr[exampleIndex])
print newIndptr
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment