File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -71,16 +71,14 @@ def compute_euc(a, b):
7171 oids = np .empty (0 )
7272 hids = np .empty (0 )
7373 dists = np .empty ((0 , 0 ))
74-
75- fgt = fid_to_fgt .get (fid , None )
76- fdt = fid_to_fdt .get (fid , None )
77- if fgt is not None and fdt is not None :
78- oids = fgt .index .get_level_values (1 )
79- hids = fdt .index .get_level_values (1 )
80- if len (oids ) > 0 and len (hids ) > 0 :
81- # dists = compute_dist(fgt[distfields].values, fdt[distfields].values)
82- dists = compute_dist (fgt .values , fdt .values )
83-
74+ if fid in fid_to_fgt :
75+ fgt = fid_to_fgt [fid ]
76+ oids = fgt .index .get_level_values ('Id' )
77+ if fid in fid_to_fdt :
78+ fdt = fid_to_fdt [fid ]
79+ hids = fdt .index .get_level_values ('Id' )
80+ if len (oids ) > 0 and len (hids ) > 0 :
81+ dists = compute_dist (fgt .values , fdt .values )
8482 acc .update (oids , hids , dists , frameid = fid )
8583
8684 return acc
You can’t perform that action at this time.
0 commit comments