def arraysigtest(self,ref,test):
#Raise an error if the arrays are not the same size
if test.shape != ref.shape:
raise ValueError("Array size mismatch")
tt=test[2:-2]
rr=ref[2:-2]
#Identify the significant elements
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)):
self.tra['SigElemDiscrep']=True
tidx=ridx
#Now compare only the significant elements.
#We no longer need to exclude points with zero value, because
#those points were already excluded as insignificant.
self.arraytest(tt[ridx],rr[ridx])
评论列表
文章目录