From ae5d6fdd5ad76b60fb4f7df7392785b360492151 Mon Sep 17 00:00:00 2001 From: Matt Mallory Date: Thu, 21 May 2026 15:09:54 -0700 Subject: [PATCH] fix: replace deprecated np.math with stdlib math module np.math was deprecated in NumPy 1.25 and removed in NumPy 2.0. Replace all usages with the standard library math module directly. --- morph_utils/modifications.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/morph_utils/modifications.py b/morph_utils/modifications.py index 1c17c9d..6b25975 100644 --- a/morph_utils/modifications.py +++ b/morph_utils/modifications.py @@ -10,7 +10,7 @@ from morph_utils.measurements import dist_bwn_nodes from scipy import interpolate from copy import copy - +import math def prune_tree(morphology,num_node_thresh, node_types=[1,2,3,4] ): """will prune any segments in the tree that are shorter than a given length threhsold, @@ -298,7 +298,7 @@ def resample_morphology(morph, spacing_size=None, angle_threshold=None): new_nodes.append(new_node) equiv_idx+=step_size - equiv_idx = np.math.floor(equiv_idx) + equiv_idx = math.floor(equiv_idx) node_ct+=1