issues
search
GuyAllard
/
markov_clustering
markov clustering in python
MIT License
167
stars
37
forks
source link
Shape mismatch in assignment
#22
Open
krishdb38
opened
4 years ago
krishdb38
commented
4 years ago
ValueError Traceback (most recent call last)
in
----> 1 result = mc.run_mcl(matrix) # run MCL with default parameters 2 clusters = mc.get_clusters(result) # get clusters ~\Anaconda3\lib\site-packages\markov_clustering\mcl.py in run_mcl(matrix, expansion, inflation, loop_value, iterations, pruning_threshold, pruning_frequency, convergence_check_frequency, verbose) 231 if pruning_threshold > 0 and i % pruning_frequency == pruning_frequency - 1: 232 printer.print("Pruning") --> 233 matrix = prune(matrix, pruning_threshold) 234 235 # Check for convergence ~\Anaconda3\lib\site-packages\markov_clustering\mcl.py in prune(matrix, threshold) 91 if isspmatrix(matrix): 92 pruned = dok_matrix(matrix.shape) ---> 93 pruned[matrix >= threshold] = matrix[matrix >= threshold] 94 pruned = pruned.tocsc() 95 else: ~\Anaconda3\lib\site-packages\scipy\sparse\_index.py in __setitem__(self, key, x) 122 x, _ = _broadcast_arrays(x, i) 123 if x.shape != i.shape: --> 124 raise ValueError("shape mismatch in assignment") 125 if x.size == 0: 126 return **ValueError: shape mismatch in assignment**
ValueError Traceback (most recent call last)