Skip to content

Commit 49c3804

Browse files
committed
fix
1 parent 162c5ff commit 49c3804

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/pyXenium/analysis/protein_gene_correlation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,9 @@ def _ensure_1d(name, arr, target_len):
662662

663663
# Save pair CSV with binned data
664664
# Prepare DataFrame of binned values (only include bins with at least one cell to avoid overwhelming zeros outside tissue)
665-
y_idx, x_idx = np.nonzero(cell_count) # indices of bins that contain cells
665+
y_idx, x_idx = np.indices((ny, nx))
666+
y_idx = y_idx.ravel()
667+
x_idx = x_idx.ravel()
666668
records = []
667669
for yi, xi in zip(y_idx, x_idx):
668670
records.append({

0 commit comments

Comments
 (0)