Skip to content

Commit

Permalink
unnecessary loop for
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrilJl authored Oct 21, 2024
1 parent 9784a40 commit bb745f8
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions optimask/_optimask.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,7 @@ def compute_to_keep(size, index_with_nan, permutation, split):
for i in range(split):
mask[index_with_nan[permutation[i]]] = 1

count = 0
for i in range(size):
if mask[i] == 0:
count += 1

result = np.empty(count, dtype=np.uint32)
result = np.empty(size - split, dtype=np.uint32)
idx = 0
for i in range(size):
if mask[i] == 0:
Expand Down

0 comments on commit bb745f8

Please sign in to comment.