From 1a6417320ac5139becc099dd6941ba980d3e4443 Mon Sep 17 00:00:00 2001 From: Philip Cook Date: Tue, 18 Jun 2024 16:03:27 -0400 Subject: [PATCH] BUG: Remove deprecated np.math --- ants/registration/landmark_transforms.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ants/registration/landmark_transforms.py b/ants/registration/landmark_transforms.py index 07b4e622..41341e56 100644 --- a/ants/registration/landmark_transforms.py +++ b/ants/registration/landmark_transforms.py @@ -2,6 +2,7 @@ "fit_time_varying_transform_to_point_sets"] import numpy as np +import math import time import ants @@ -208,8 +209,8 @@ def create_zero_velocity_field(domain_image, number_of_time_points=2): A = np.dot(x_svd[0], x_svd[2]) if transform_type == 'similarity': - scaling = (np.math.sqrt((np.power(y, 2).sum(axis=1) / number_of_points).mean()) / - np.math.sqrt((np.power(x, 2).sum(axis=1) / number_of_points).mean())) + scaling = (math.sqrt((np.power(y, 2).sum(axis=1) / number_of_points).mean()) / + math.sqrt((np.power(x, 2).sum(axis=1) / number_of_points).mean())) A = np.dot(A, np.eye(dimensionality) * scaling) xfrm = ants.create_ants_transform(matrix=A, translation=translation,