File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -78,10 +78,12 @@ def remove_family_guids(
78
78
if project_guid not in hl .eval (ht .globals .project_families ):
79
79
return ht
80
80
project_i = ht .project_guids .index (project_guid )
81
- family_indexes_to_keep = hl .array (
82
- hl .enumerate (ht .globals .project_families [project_guid ])
83
- .filter (lambda item : ~ family_guids .contains (item [1 ]))
84
- .map (lambda item : item [0 ]),
81
+ family_indexes_to_keep = hl .eval (
82
+ hl .array (
83
+ hl .enumerate (ht .globals .project_families [project_guid ])
84
+ .filter (lambda item : ~ family_guids .contains (item [1 ]))
85
+ .map (lambda item : item [0 ]),
86
+ ),
85
87
)
86
88
ht = ht .annotate (
87
89
project_stats = (
@@ -90,8 +92,12 @@ def remove_family_guids(
90
92
hl .if_else (
91
93
i != project_i ,
92
94
fs ,
93
- family_indexes_to_keep .map (
94
- lambda j : ht .project_stats [i ][j ],
95
+ (
96
+ hl .array (family_indexes_to_keep ).map (
97
+ lambda j : ht .project_stats [i ][j ],
98
+ )
99
+ if len (family_indexes_to_keep ) > 0
100
+ else hl .empty_array (ht .project_stats [i ].dtype .element_type )
95
101
),
96
102
)
97
103
),
You can’t perform that action at this time.
0 commit comments