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

Trying to fix segmentation fault

parent 95810d7c
No related branches found
No related tags found
No related merge requests found
...@@ -38,6 +38,7 @@ def extractSubset(matrix, usedIndices): ...@@ -38,6 +38,7 @@ def extractSubset(matrix, usedIndices):
oldindptr = matrix.indptr oldindptr = matrix.indptr
for exampleIndexIndex, exampleIndex in enumerate(usedIndices): for exampleIndexIndex, exampleIndex in enumerate(usedIndices):
newIndptr[exampleIndexIndex+1] = newIndptr[exampleIndexIndex]+(oldindptr[exampleIndex+1]-oldindptr[exampleIndex]) newIndptr[exampleIndexIndex+1] = newIndptr[exampleIndexIndex]+(oldindptr[exampleIndex+1]-oldindptr[exampleIndex])
print newIndptr[-1]
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment