Skip to content

Commit 3f2a45f

Browse files
committed
remove change to filter_intervals
1 parent 44ad44c commit 3f2a45f

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

src/grelu/data/preprocess.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,14 @@ def filter_intervals(
3434
Returns:
3535
Filtered intervals in the same format (if inplace = False)
3636
"""
37-
37+
print("Keeping {} intervals".format(sum(keep)))
3838
if isinstance(data, pd.DataFrame):
39-
if sum(keep) < data.shape[0]:
40-
print("Keeping {} of {} intervals".format(sum(keep), data.shape[0]))
41-
return data.drop(index=data.index[~keep], inplace=inplace)
42-
else:
43-
return data
39+
return data.drop(index=data.index[~keep], inplace=inplace)
4440
elif isinstance(data, AnnData):
45-
if sum(keep) < data.shape[1]:
46-
print("Keeping {} of {} intervals".format(sum(keep), data.shape[1]))
47-
if inplace:
48-
data._inplace_subset_var(index=data.var_names[keep])
49-
else:
50-
return data[:, keep]
41+
if inplace:
42+
data._inplace_subset_var(index=data.var_names[keep])
5143
else:
52-
return data
44+
return data[:, keep]
5345

5446

5547
def filter_obs(

0 commit comments

Comments
 (0)