From 452cc024eec8cb6ae69c4da868dc83dbf9de6e72 Mon Sep 17 00:00:00 2001 From: psyrixen <68197901+psyrixen@users.noreply.github.com> Date: Fri, 20 Mar 2026 10:46:49 +0530 Subject: [PATCH] Fix type casting in chi squared print statement For use with numpy>=1.25. Newer versions of numpy break with old code --- components/isceobj/Util/Library/python/Poly2D.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/isceobj/Util/Library/python/Poly2D.py b/components/isceobj/Util/Library/python/Poly2D.py index 447bd35e7..e81b81126 100755 --- a/components/isceobj/Util/Library/python/Poly2D.py +++ b/components/isceobj/Util/Library/python/Poly2D.py @@ -377,7 +377,7 @@ def polyfit(self,xin,yin,zin, val, res, rank, eigs = np.linalg.lstsq(A,z, rcond=cond) if len(res)> 0: - print('Chi squared: %f'%(np.sqrt(res/(1.0*len(z))))) + print('Chi squared: %f'%(float(np.sqrt(res/(1.0*len(z)))))) else: print('No chi squared value....') print('Try reducing rank of polynomial.')