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

Trying to fix segmentation fault

parent f867f02f
No related branches found
No related tags found
No related merge requests found
...@@ -405,9 +405,9 @@ def makeSparseTotalMatrix(sortedRNASeq): ...@@ -405,9 +405,9 @@ def makeSparseTotalMatrix(sortedRNASeq):
def getAdjacenceMatrix(RNASeqRanking, sotredRNASeq, k=2): def getAdjacenceMatrix(RNASeqRanking, sotredRNASeq, k=2):
k=int(k)/2*2 k=int(k)/2*2
indices = np.zeros((RNASeqRanking.shape[0]*k*RNASeqRanking.shape[1]), dtype=np.int32) indices = np.zeros((RNASeqRanking.shape[0]*k*RNASeqRanking.shape[1]), dtype=int)
data = np.ones((RNASeqRanking.shape[0]*k*RNASeqRanking.shape[1]), dtype=bool) data = np.ones((RNASeqRanking.shape[0]*k*RNASeqRanking.shape[1]), dtype=bool)
indptr = np.zeros(RNASeqRanking.shape[0]+1, dtype=np.int16) indptr = np.zeros(RNASeqRanking.shape[0]+1, dtype=int)
nbGenes = RNASeqRanking.shape[1] nbGenes = RNASeqRanking.shape[1]
pointer = 0 pointer = 0
for patientIndex in range(RNASeqRanking.shape[0]): for patientIndex in range(RNASeqRanking.shape[0]):
......
...@@ -12,6 +12,7 @@ def getV(DATASET, viewIndex, usedIndices=None): ...@@ -12,6 +12,7 @@ def getV(DATASET, viewIndex, usedIndices=None):
DATASET.get("View"+str(viewIndex)).get("indices").value, DATASET.get("View"+str(viewIndex)).get("indices").value,
DATASET.get("View"+str(viewIndex)).get("indptr").value), DATASET.get("View"+str(viewIndex)).get("indptr").value),
shape=DATASET.get("View"+str(viewIndex)).attrs["shape"])[usedIndices,:] shape=DATASET.get("View"+str(viewIndex)).attrs["shape"])[usedIndices,:]
return sparse_mat return sparse_mat
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment