From 990dbbb15932ee2e9f6d3f4b278323145df646b6 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Tue, 9 Jul 2024 10:28:11 -0400 Subject: [PATCH] replace usages of `numpy.alltrue()` with `numpy.all()` / `numpy.any()` --- commissioning/basecase.py | 4 ++-- commissioning/convert/conv_base.py | 4 ++-- pysynphot/spectrum.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/commissioning/basecase.py b/commissioning/basecase.py index bacb6625..6fbcba5d 100644 --- a/commissioning/basecase.py +++ b/commissioning/basecase.py @@ -123,7 +123,7 @@ def arraysigtest(self,test,ref): tidx=N.where(tt>(self.sigthresh*tt.max()))[0] ridx=N.where(rr>(self.sigthresh*rr.max()))[0] #Set a flag if they're not the same set - if not (N.alltrue(tidx == ridx)): + if N.any(tidx != ridx): self.tra['SigElemDiscrep']=True tidx=ridx @@ -152,7 +152,7 @@ def arraytest(self,test,ref): self.tra['Outliers']=self.count_outliers(5) if (self.tra['Discrepfrac'] > self.superthresh): self.tra['Extreme']=True - self.failUnless(N.alltrue(abs(self.adiscrep)(self.sigthresh*tt.max()))[0] ridx=N.where(rr>(self.sigthresh*rr.max()))[0] #Set a flag if they're not the same set - if not (N.alltrue(tidx == ridx)): + if N.any(tidx != ridx): self.tra['SigElemDiscrep']=True tidx=ridx @@ -115,7 +115,7 @@ def arraytest(self,ref,test): self.tra['Discrepmean']=self.adiscrep.mean() self.tra['Discrepstd']=self.adiscrep.std() self.tra['Outliers']=self.count_outliers(5) - self.failUnless(N.alltrue(abs(self.adiscrep)