Skip to content

Commit

Permalink
fix: np.array copy behavior change in numpy 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nvictus committed Dec 19, 2024
1 parent d45a1b6 commit 915578d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cooler/create/_ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ def _sanitize_records(
return chunk

# Find positional anchor columns, convert to zero-based if needed
anchor1 = np.array(chunk[anchor_field + suffixes[0]])
anchor2 = np.array(chunk[anchor_field + suffixes[1]])
anchor1 = chunk[anchor_field + suffixes[0]].to_numpy(copy=True)
anchor2 = chunk[anchor_field + suffixes[1]].to_numpy(copy=True)
if is_one_based:
anchor1 -= 1
anchor2 -= 1
Expand Down

0 comments on commit 915578d

Please sign in to comment.