File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -186,7 +186,6 @@ def matrix_correlation(x, y):
186186 return cc
187187
188188
189- @jit
190189def functional_connectivity (activities ):
191190 """Functional connectivity matrix of timeseries activities.
192191
@@ -200,12 +199,12 @@ def functional_connectivity(activities):
200199 connectivity_matrix: tensor
201200 ``num_sample x num_sample`` functional connectivity matrix.
202201 """
203- activities = bm .asarray (activities )
202+ activities = bm .as_numpy (activities )
204203 if activities .ndim != 2 :
205204 raise ValueError ('Only support 2d tensor with shape of "(num_time, num_sample)". '
206205 f'But we got a tensor with the shape of { activities .shape } ' )
207- fc = bm .corrcoef (activities .T )
208- return bm .nan_to_num (fc )
206+ fc = np .corrcoef (activities .T )
207+ return np .nan_to_num (fc )
209208
210209
211210@jit
You can’t perform that action at this time.
0 commit comments