Skip to content

Commit 0de58dd

Browse files
author
niklasmueboe
committed
drop large df early
1 parent a27fae1 commit 0de58dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ovrlpy/_kde.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ def _sample_expression(
226226

227227
if genes is not None:
228228
transcripts = transcripts.filter(pl.col("gene").cast(pl.String).is_in(genes))
229+
gene_list = sorted(transcripts[gene_column].unique())
229230

230231
# truncate * bandwidth -> _TRUNCATE * 1
231232
padding = _TRUNCATE
@@ -279,8 +280,8 @@ def _sample_expression(
279280
pd.DataFrame(dict(f.result() for f in as_completed(futures)))
280281
)
281282
del futures
283+
del transcripts, local_maximum_coordinates
282284

283-
gene_list = sorted(transcripts[gene_column].unique())
284285
# TODO: sparse?
285286
with warnings.catch_warnings():
286287
warnings.simplefilter("ignore", category=ImplicitModificationWarning)

0 commit comments

Comments
 (0)