Commit ea798b80 authored by Sulfyderz's avatar Sulfyderz
Browse files

[Error Update]:Since threshold from scipy.stats no longer exists, replacement.

parent 2d24a8c8
......@@ -3,7 +3,6 @@ __author__ = 'meignier'
import copy
import logging
import numpy as np
from scipy.stats import threshold
from scipy.sparse import csgraph
from collections import namedtuple
from sidekit.bosaris.scores import Scores
......@@ -67,7 +66,10 @@ class ConnectedComponent:
logging.debug('threshold the distance matrix')
distances, t = scores2distance(self.scores, self.thr)
graph = threshold(distances, threshmax=t, newval=np.inf)
mask = (distances>t)
graph = distances.copy()
graph[mask] = np.inf
#graph = threshold(distances, threshmax=t, newval=np.inf)
logging.debug('get connected components')
cc_nb, cc_list = csgraph.connected_components(graph, directed=False)
diar_out = copy.deepcopy(self.diar)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment