Skip to content

Commit 0c55f5f

Browse files
committed
fix: filter nulls in polars df to align with subsequent check
1 parent 12474e7 commit 0c55f5f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

linopy/common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ def filter_nulls_polars(df: pl.DataFrame) -> pl.DataFrame:
415415
cond.append(reduce(operator.or_, [pl.col(c).ne(-1) for c in varcols]))
416416
if "coeffs" in df.columns:
417417
cond.append(pl.col("coeffs").ne(0))
418+
cond.append(pl.col("coeffs").is_not_null())
418419
if "labels" in df.columns:
419420
cond.append(pl.col("labels").ne(-1))
420421

0 commit comments

Comments
 (0)