/[escript]/trunk/escript/test/python/test_util_binary_no_tagged_data.py
ViewVC logotype

Diff of /trunk/escript/test/python/test_util_binary_no_tagged_data.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 396 by gross, Wed Dec 21 05:08:25 2005 UTC revision 400 by gross, Wed Dec 21 23:13:39 2005 UTC
# Line 23031  class Test_util_binary_no_tagged_data(Te Line 23031  class Test_util_binary_no_tagged_data(Te
23031        arg1=0.400555937829        arg1=0.400555937829
23032        res=maximum(arg0,arg1)        res=maximum(arg0,arg1)
23033        ref=0.400555937829        ref=0.400555937829
23034        self.failUnless(isinstance(res,float),"wrong type of result.")        if isinstance(res,numarray.NumArray):
23035             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
23036          else:
23037             self.failUnless(isinstance(res,float),"wrong type of result.")
23038        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
23039     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
23040     def test_maximum_float_rank0_array_rank0(self):     def test_maximum_float_rank0_array_rank0(self):
# Line 23241  class Test_util_binary_no_tagged_data(Te Line 23244  class Test_util_binary_no_tagged_data(Te
23244        arg1=-0.367677151081        arg1=-0.367677151081
23245        res=maximum(arg0,arg1)        res=maximum(arg0,arg1)
23246        ref=numarray.array(-0.367677151081)        ref=numarray.array(-0.367677151081)
23247        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if isinstance(res,numarray.NumArray):
23248        self.failUnlessEqual(res.shape,(),"wrong shape of result.")            self.failUnlessEqual(res.shape,(),"wrong shape of result.")
23249          else:
23250              self.failUnless(isinstance(res,float),"wrong type of result.")
23251        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
23252     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
23253     def test_maximum_array_rank1_float_rank0(self):     def test_maximum_array_rank1_float_rank0(self):
# Line 23286  class Test_util_binary_no_tagged_data(Te Line 23291  class Test_util_binary_no_tagged_data(Te
23291        arg1=numarray.array(-0.259958577128)        arg1=numarray.array(-0.259958577128)
23292        res=maximum(arg0,arg1)        res=maximum(arg0,arg1)
23293        ref=numarray.array(-0.259958577128)        ref=numarray.array(-0.259958577128)
23294        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if isinstance(res,numarray.NumArray):
23295        self.failUnlessEqual(res.shape,(),"wrong shape of result.")            self.failUnlessEqual(res.shape,(),"wrong shape of result.")
23296          else:
23297              self.failUnless(isinstance(res,float),"wrong type of result.")
23298        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
23299     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
23300     def test_maximum_array_rank1_array_rank0(self):     def test_maximum_array_rank1_array_rank0(self):
# Line 25711  class Test_util_binary_no_tagged_data(Te Line 25718  class Test_util_binary_no_tagged_data(Te
25718        arg1=numarray.array(-0.445379036457)        arg1=numarray.array(-0.445379036457)
25719        res=minimum(arg0,arg1)        res=minimum(arg0,arg1)
25720        ref=numarray.array(-0.445379036457)        ref=numarray.array(-0.445379036457)
25721        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if isinstance(res,numarray.NumArray):
25722        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnlessEqual(res.shape,(),"wrong shape of result.")
25723          else:
25724             self.failUnless(isinstance(res,float),"wrong type of result.")
25725        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
25726     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
25727     def test_minimum_float_rank0_Symbol_rank0(self):     def test_minimum_float_rank0_Symbol_rank0(self):
# Line 25911  class Test_util_binary_no_tagged_data(Te Line 25920  class Test_util_binary_no_tagged_data(Te
25920        arg1=-0.931803549177        arg1=-0.931803549177
25921        res=minimum(arg0,arg1)        res=minimum(arg0,arg1)
25922        ref=numarray.array(-0.931803549177)        ref=numarray.array(-0.931803549177)
25923        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if isinstance(res,numarray.NumArray):
25924        self.failUnlessEqual(res.shape,(),"wrong shape of result.")            self.failUnlessEqual(res.shape,(),"wrong shape of result.")
25925          else:
25926              self.failUnless(isinstance(res,float),"wrong type of result.")
25927        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
25928     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
25929     def test_minimum_array_rank1_float_rank0(self):     def test_minimum_array_rank1_float_rank0(self):

Legend:
Removed from v.396  
changed lines
  Added in v.400

  ViewVC Help
Powered by ViewVC 1.1.26