Skip to content

Commit efa4830

Browse files
authored
fix additional location (#824)
* fix additional location * remove comma
1 parent 34923a8 commit efa4830

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

v03_pipeline/lib/misc/lookup.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,12 @@ def remove_family_guids(
7878
if project_guid not in hl.eval(ht.globals.project_families):
7979
return ht
8080
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+
),
8587
)
8688
ht = ht.annotate(
8789
project_stats=(
@@ -90,8 +92,12 @@ def remove_family_guids(
9092
hl.if_else(
9193
i != project_i,
9294
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)
95101
),
96102
)
97103
),

0 commit comments

Comments
 (0)