From 3a7d7ed1e9f3fa647ed8807817f4bea50ecf2c12 Mon Sep 17 00:00:00 2001 From: Eric Roberts Date: Thu, 26 Sep 2024 10:45:53 -0400 Subject: [PATCH] Add numpy 2.0 compatability (#72) Replaces NINF and PINF with -np.inf and np.inf respectively --- genomedata/_close_data.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/genomedata/_close_data.py b/genomedata/_close_data.py index 1ac8321..130190d 100644 --- a/genomedata/_close_data.py +++ b/genomedata/_close_data.py @@ -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 @@ -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)