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

Trying to fix segmentation fault

parent 3b5825a3
No related branches found
No related tags found
No related merge requests found
...@@ -40,6 +40,7 @@ def extractSubset(matrix, usedIndices): ...@@ -40,6 +40,7 @@ def extractSubset(matrix, usedIndices):
newData = np.ones(newIndptr[-1], dtype=bool) newData = np.ones(newIndptr[-1], dtype=bool)
newIndices = np.zeros(newIndptr[-1], dtype=np.int32) newIndices = np.zeros(newIndptr[-1], dtype=np.int32)
oldIndices = matrix.indices oldIndices = matrix.indices
print newIndptr
for exampleIndexIndex, exampleIndex in enumerate(usedIndices): for exampleIndexIndex, exampleIndex in enumerate(usedIndices):
print newIndptr[exampleIndexIndex], newIndptr[exampleIndexIndex+1] print newIndptr[exampleIndexIndex], newIndptr[exampleIndexIndex+1]
newIndices[newIndptr[exampleIndexIndex]:newIndptr[exampleIndexIndex+1]] = oldIndices[oldindptr[exampleIndex]: oldindptr[exampleIndex+1]] newIndices[newIndptr[exampleIndexIndex]:newIndptr[exampleIndexIndex+1]] = oldIndices[oldindptr[exampleIndex]: oldindptr[exampleIndex+1]]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment