Skip to content

Commit

Permalink
Add numpy 2.0 compatability (#72)
Browse files Browse the repository at this point in the history
Replaces NINF and PINF with -np.inf and np.inf respectively
  • Loading branch information
EricR86 authored Sep 26, 2024
1 parent ed6378e commit 3a7d7ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions genomedata/_close_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
from argparse import ArgumentParser
import sys

from numpy import (amin, amax, argmax, array, diff, hstack, isfinite, NINF,
PINF, square)
from numpy import (amin, amax, argmax, array, diff, hstack, isfinite, inf,
square)
from six.moves import zip
from tables import NoSuchNodeError

Expand Down Expand Up @@ -192,8 +192,8 @@ def write_metadata(chromosome, verbose=False):

num_obs = len(tracknames)
row_shape = (num_obs,)
mins = fill_array(PINF, row_shape)
maxs = fill_array(NINF, row_shape)
mins = fill_array(inf, row_shape)
maxs = fill_array(-inf, row_shape)
sums = fill_array(0.0, row_shape)
sums_squares = fill_array(0.0, row_shape)
num_datapoints = fill_array(0, row_shape)
Expand Down

0 comments on commit 3a7d7ed

Please sign in to comment.