Skip to content

Commit 6ecbaca

Browse files
Update fslite/fs/fdataframe.py
Co-authored-by: codiumai-pr-agent-pro[bot] <151058649+codiumai-pr-agent-pro[bot]@users.noreply.github.com>
1 parent 8608117 commit 6ecbaca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fslite/fs/fdataframe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def __init__(
109109

110110
# Check sparsity
111111
num_elements = numerical_df.size
112-
num_zeros = (numerical_df == 0).sum().sum()
112+
num_zeros = np.count_nonzero(numerical_df == 0)
113113
sparsity = num_zeros / num_elements
114114

115115
dense_matrix_size = numerical_df.memory_usage(deep=True).sum() # In bytes

0 commit comments

Comments
 (0)