/[escript]/trunk/escript/py_src/test_util.py
ViewVC logotype

Diff of /trunk/escript/py_src/test_util.py

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

revision 313 by gross, Mon Dec 5 07:01:36 2005 UTC revision 341 by gross, Mon Dec 12 05:26:10 2005 UTC
# Line 55  This test assumes that the functionspace Line 55  This test assumes that the functionspace
55  __author__="Lutz Gross, l.gross@uq.edu.au"  __author__="Lutz Gross, l.gross@uq.edu.au"
56  __licence__="contact: esys@access.uq.edu.au"  __licence__="contact: esys@access.uq.edu.au"
57  __url__="http://www.iservo.edu.au/esys/escript"  __url__="http://www.iservo.edu.au/esys/escript"
58  __version__="$Revision$"  __version__="$Revision: 313 $"
59  __date__="$Date$"  __date__="$Date$"
60    
61  import unittest  import unittest
# Line 10325  class Test_util_unary_no_tagged_data(Tes Line 10325  class Test_util_unary_no_tagged_data(Tes
10325        arg=numarray.array(45.1686859861)        arg=numarray.array(45.1686859861)
10326        res=log10(arg)        res=log10(arg)
10327        ref=numarray.array(1.65483745657)        ref=numarray.array(1.65483745657)
10328        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
10329        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
10330             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
10331        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
10332     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10333     def test_log10_array_rank1(self):     def test_log10_array_rank1(self):
# Line 10512  class Test_util_unary_no_tagged_data(Tes Line 10513  class Test_util_unary_no_tagged_data(Tes
10513        arg=numarray.array(-15.0739210922)        arg=numarray.array(-15.0739210922)
10514        res=wherePositive(arg)        res=wherePositive(arg)
10515        ref=numarray.array(0.0)        ref=numarray.array(0.0)
10516        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
10517        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
10518             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
10519        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
10520     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10521     def test_wherePositive_array_rank1(self):     def test_wherePositive_array_rank1(self):
# Line 10699  class Test_util_unary_no_tagged_data(Tes Line 10701  class Test_util_unary_no_tagged_data(Tes
10701        arg=numarray.array(12.3306392667)        arg=numarray.array(12.3306392667)
10702        res=whereNegative(arg)        res=whereNegative(arg)
10703        ref=numarray.array(0.0)        ref=numarray.array(0.0)
10704        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
10705        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
10706             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
10707        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
10708     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10709     def test_whereNegative_array_rank1(self):     def test_whereNegative_array_rank1(self):
# Line 10886  class Test_util_unary_no_tagged_data(Tes Line 10889  class Test_util_unary_no_tagged_data(Tes
10889        arg=numarray.array(-77.2396345376)        arg=numarray.array(-77.2396345376)
10890        res=whereNonNegative(arg)        res=whereNonNegative(arg)
10891        ref=numarray.array(0.0)        ref=numarray.array(0.0)
10892        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
10893        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
10894             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
10895        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
10896     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10897     def test_whereNonNegative_array_rank1(self):     def test_whereNonNegative_array_rank1(self):
# Line 11073  class Test_util_unary_no_tagged_data(Tes Line 11077  class Test_util_unary_no_tagged_data(Tes
11077        arg=numarray.array(-63.8959249588)        arg=numarray.array(-63.8959249588)
11078        res=whereNonPositive(arg)        res=whereNonPositive(arg)
11079        ref=numarray.array(1.0)        ref=numarray.array(1.0)
11080        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
11081        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
11082             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
11083        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
11084     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11085     def test_whereNonPositive_array_rank1(self):     def test_whereNonPositive_array_rank1(self):
# Line 11260  class Test_util_unary_no_tagged_data(Tes Line 11265  class Test_util_unary_no_tagged_data(Tes
11265        arg=numarray.array(-93.2286970236)        arg=numarray.array(-93.2286970236)
11266        res=whereZero(arg)        res=whereZero(arg)
11267        ref=numarray.array(0.0)        ref=numarray.array(0.0)
11268        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
11269        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
11270             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
11271        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
11272     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11273     def test_whereZero_array_rank1(self):     def test_whereZero_array_rank1(self):
# Line 11447  class Test_util_unary_no_tagged_data(Tes Line 11453  class Test_util_unary_no_tagged_data(Tes
11453        arg=numarray.array(71.1859507003)        arg=numarray.array(71.1859507003)
11454        res=whereNonZero(arg)        res=whereNonZero(arg)
11455        ref=numarray.array(1.0)        ref=numarray.array(1.0)
11456        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
11457        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
11458             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
11459        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
11460     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11461     def test_whereNonZero_array_rank1(self):     def test_whereNonZero_array_rank1(self):
# Line 11634  class Test_util_unary_no_tagged_data(Tes Line 11641  class Test_util_unary_no_tagged_data(Tes
11641        arg=numarray.array(-19.1395275546)        arg=numarray.array(-19.1395275546)
11642        res=sin(arg)        res=sin(arg)
11643        ref=numarray.array(-0.285925042532)        ref=numarray.array(-0.285925042532)
11644        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
11645        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
11646             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
11647        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
11648     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11649     def test_sin_array_rank1(self):     def test_sin_array_rank1(self):
# Line 11821  class Test_util_unary_no_tagged_data(Tes Line 11829  class Test_util_unary_no_tagged_data(Tes
11829        arg=numarray.array(81.9030902279)        arg=numarray.array(81.9030902279)
11830        res=cos(arg)        res=cos(arg)
11831        ref=numarray.array(0.975529175116)        ref=numarray.array(0.975529175116)
11832        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
11833        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
11834             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
11835        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
11836     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11837     def test_cos_array_rank1(self):     def test_cos_array_rank1(self):
# Line 12008  class Test_util_unary_no_tagged_data(Tes Line 12017  class Test_util_unary_no_tagged_data(Tes
12017        arg=numarray.array(90.0547372602)        arg=numarray.array(90.0547372602)
12018        res=tan(arg)        res=tan(arg)
12019        ref=numarray.array(-1.74918567862)        ref=numarray.array(-1.74918567862)
12020        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
12021        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
12022             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
12023        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
12024     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12025     def test_tan_array_rank1(self):     def test_tan_array_rank1(self):
# Line 12195  class Test_util_unary_no_tagged_data(Tes Line 12205  class Test_util_unary_no_tagged_data(Tes
12205        arg=numarray.array(-0.116366973393)        arg=numarray.array(-0.116366973393)
12206        res=asin(arg)        res=asin(arg)
12207        ref=numarray.array(-0.116631212893)        ref=numarray.array(-0.116631212893)
12208        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
12209        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
12210             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
12211        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
12212     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12213     def test_asin_array_rank1(self):     def test_asin_array_rank1(self):
# Line 12382  class Test_util_unary_no_tagged_data(Tes Line 12393  class Test_util_unary_no_tagged_data(Tes
12393        arg=numarray.array(0.826889176675)        arg=numarray.array(0.826889176675)
12394        res=acos(arg)        res=acos(arg)
12395        ref=numarray.array(0.597243033529)        ref=numarray.array(0.597243033529)
12396        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
12397        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
12398             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
12399        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
12400     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12401     def test_acos_array_rank1(self):     def test_acos_array_rank1(self):
# Line 12569  class Test_util_unary_no_tagged_data(Tes Line 12581  class Test_util_unary_no_tagged_data(Tes
12581        arg=numarray.array(-21.3588712779)        arg=numarray.array(-21.3588712779)
12582        res=atan(arg)        res=atan(arg)
12583        ref=numarray.array(-1.5240115377)        ref=numarray.array(-1.5240115377)
12584        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
12585        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
12586             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
12587        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
12588     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12589     def test_atan_array_rank1(self):     def test_atan_array_rank1(self):
# Line 12756  class Test_util_unary_no_tagged_data(Tes Line 12769  class Test_util_unary_no_tagged_data(Tes
12769        arg=numarray.array(2.05667480474)        arg=numarray.array(2.05667480474)
12770        res=sinh(arg)        res=sinh(arg)
12771        ref=numarray.array(3.84602263608)        ref=numarray.array(3.84602263608)
12772        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
12773        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
12774             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
12775        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
12776     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12777     def test_sinh_array_rank1(self):     def test_sinh_array_rank1(self):
# Line 12943  class Test_util_unary_no_tagged_data(Tes Line 12957  class Test_util_unary_no_tagged_data(Tes
12957        arg=numarray.array(-3.22296171288)        arg=numarray.array(-3.22296171288)
12958        res=cosh(arg)        res=cosh(arg)
12959        ref=numarray.array(12.5710965319)        ref=numarray.array(12.5710965319)
12960        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
12961        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
12962             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
12963        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
12964     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12965     def test_cosh_array_rank1(self):     def test_cosh_array_rank1(self):
# Line 13130  class Test_util_unary_no_tagged_data(Tes Line 13145  class Test_util_unary_no_tagged_data(Tes
13145        arg=numarray.array(-1.1594273991)        arg=numarray.array(-1.1594273991)
13146        res=tanh(arg)        res=tanh(arg)
13147        ref=numarray.array(-0.820853186665)        ref=numarray.array(-0.820853186665)
13148        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
13149        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
13150             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
13151        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
13152     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
13153     def test_tanh_array_rank1(self):     def test_tanh_array_rank1(self):
# Line 13317  class Test_util_unary_no_tagged_data(Tes Line 13333  class Test_util_unary_no_tagged_data(Tes
13333        arg=numarray.array(-28.2897331664)        arg=numarray.array(-28.2897331664)
13334        res=asinh(arg)        res=asinh(arg)
13335        ref=numarray.array(-4.03595836682)        ref=numarray.array(-4.03595836682)
13336        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
13337        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
13338             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
13339        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
13340     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
13341     def test_asinh_array_rank1(self):     def test_asinh_array_rank1(self):
# Line 13504  class Test_util_unary_no_tagged_data(Tes Line 13521  class Test_util_unary_no_tagged_data(Tes
13521        arg=numarray.array(79.3820855421)        arg=numarray.array(79.3820855421)
13522        res=acosh(arg)        res=acosh(arg)
13523        ref=numarray.array(5.0673802251)        ref=numarray.array(5.0673802251)
13524        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
13525        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
13526             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
13527        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
13528     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
13529     def test_acosh_array_rank1(self):     def test_acosh_array_rank1(self):
# Line 13691  class Test_util_unary_no_tagged_data(Tes Line 13709  class Test_util_unary_no_tagged_data(Tes
13709        arg=numarray.array(-0.30414451933)        arg=numarray.array(-0.30414451933)
13710        res=atanh(arg)        res=atanh(arg)
13711        ref=numarray.array(-0.314080283997)        ref=numarray.array(-0.314080283997)
13712        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
13713        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
13714             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
13715        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
13716     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
13717     def test_atanh_array_rank1(self):     def test_atanh_array_rank1(self):
# Line 13878  class Test_util_unary_no_tagged_data(Tes Line 13897  class Test_util_unary_no_tagged_data(Tes
13897        arg=numarray.array(3.06107617426)        arg=numarray.array(3.06107617426)
13898        res=exp(arg)        res=exp(arg)
13899        ref=numarray.array(21.3505216848)        ref=numarray.array(21.3505216848)
13900        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
13901        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
13902             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
13903        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
13904     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
13905     def test_exp_array_rank1(self):     def test_exp_array_rank1(self):
# Line 14065  class Test_util_unary_no_tagged_data(Tes Line 14085  class Test_util_unary_no_tagged_data(Tes
14085        arg=numarray.array(34.7398492007)        arg=numarray.array(34.7398492007)
14086        res=sqrt(arg)        res=sqrt(arg)
14087        ref=numarray.array(5.89405201883)        ref=numarray.array(5.89405201883)
14088        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
14089        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
14090             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
14091        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14092     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14093     def test_sqrt_array_rank1(self):     def test_sqrt_array_rank1(self):
# Line 14252  class Test_util_unary_no_tagged_data(Tes Line 14273  class Test_util_unary_no_tagged_data(Tes
14273        arg=numarray.array(15.4265888534)        arg=numarray.array(15.4265888534)
14274        res=log(arg)        res=log(arg)
14275        ref=numarray.array(2.73609256957)        ref=numarray.array(2.73609256957)
14276        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
14277        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
14278             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
14279        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14280     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14281     def test_log_array_rank1(self):     def test_log_array_rank1(self):
# Line 14439  class Test_util_unary_no_tagged_data(Tes Line 14461  class Test_util_unary_no_tagged_data(Tes
14461        arg=numarray.array(-96.6649118156)        arg=numarray.array(-96.6649118156)
14462        res=sign(arg)        res=sign(arg)
14463        ref=numarray.array(-1.0)        ref=numarray.array(-1.0)
14464        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
14465        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
14466             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
14467        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14468     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14469     def test_sign_array_rank1(self):     def test_sign_array_rank1(self):
# Line 14626  class Test_util_unary_no_tagged_data(Tes Line 14649  class Test_util_unary_no_tagged_data(Tes
14649        arg=numarray.array(38.7009229865)        arg=numarray.array(38.7009229865)
14650        res=abs(arg)        res=abs(arg)
14651        ref=numarray.array(38.7009229865)        ref=numarray.array(38.7009229865)
14652        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
14653        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
14654             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
14655        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14656     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14657     def test_abs_array_rank1(self):     def test_abs_array_rank1(self):
# Line 14813  class Test_util_unary_no_tagged_data(Tes Line 14837  class Test_util_unary_no_tagged_data(Tes
14837        arg=numarray.array(0.991109436523)        arg=numarray.array(0.991109436523)
14838        res=length(arg)        res=length(arg)
14839        ref=numarray.array(0.991109436523)        ref=numarray.array(0.991109436523)
14840        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
14841        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
14842             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
14843        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14844     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14845     def test_length_array_rank1(self):     def test_length_array_rank1(self):
14846        arg=numarray.array([-0.76294483500740484, 0.011677546682929307])        arg=numarray.array([-0.76294483500740484, 0.011677546682929307])
14847        res=length(arg)        res=length(arg)
14848        ref=numarray.array(0.763034197373)        ref=numarray.array(0.763034197373)
14849        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
14850        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
14851             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
14852        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14853     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14854     def test_length_array_rank2(self):     def test_length_array_rank2(self):
14855        arg=numarray.array([[0.43339000667591221, -0.56813106354058163, -0.70722435943768658, 0.31944814927174714, 0.79536111956010869], [-0.58324348156333672, -0.43307121633826595, 0.32581231177090197, 0.71482009238312316, -0.21002576061225442], [-0.49917603582374914, -0.63591527310476903, -0.87332002545344389, -0.91612221194664523, -0.93005892936163725], [-0.19058313727475529, -0.099980978412387289, 0.065023988386496923, -0.50908214426833687, 0.50919445067665525]])        arg=numarray.array([[0.43339000667591221, -0.56813106354058163, -0.70722435943768658, 0.31944814927174714, 0.79536111956010869], [-0.58324348156333672, -0.43307121633826595, 0.32581231177090197, 0.71482009238312316, -0.21002576061225442], [-0.49917603582374914, -0.63591527310476903, -0.87332002545344389, -0.91612221194664523, -0.93005892936163725], [-0.19058313727475529, -0.099980978412387289, 0.065023988386496923, -0.50908214426833687, 0.50919445067665525]])
14856        res=length(arg)        res=length(arg)
14857        ref=numarray.array(2.57369396272)        ref=numarray.array(2.57369396272)
14858        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
14859        self.failUnlessEqual(res.shape,(),"wrong shape of result.")            self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
14860              self.failUnlessEqual(res.shape,(),"wrong shape of result.")
14861        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14862     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14863     def test_length_array_rank3(self):     def test_length_array_rank3(self):
14864        arg=numarray.array([[[-0.9803545808261207, 0.16576061210577353], [-0.30011375458769374, 0.36782112416630941]], [[0.71430934303489013, 0.031917178828326564], [0.62738715091020936, -0.53865697329064433]], [[-0.39594881663888426, 0.51031034827379074], [-0.65321242269094326, 0.066960424832211762]], [[0.21295172167752496, 0.043385792033981962], [0.21039492093814283, -0.45875763326068775]], [[-0.14049283840925275, -0.43861027040015732], [-0.23520058218222872, -0.82264226361451076]], [[0.54845190061311566, 0.51238745343929559], [0.77453965957753224, 0.63412987812923882]]])        arg=numarray.array([[[-0.9803545808261207, 0.16576061210577353], [-0.30011375458769374, 0.36782112416630941]], [[0.71430934303489013, 0.031917178828326564], [0.62738715091020936, -0.53865697329064433]], [[-0.39594881663888426, 0.51031034827379074], [-0.65321242269094326, 0.066960424832211762]], [[0.21295172167752496, 0.043385792033981962], [0.21039492093814283, -0.45875763326068775]], [[-0.14049283840925275, -0.43861027040015732], [-0.23520058218222872, -0.82264226361451076]], [[0.54845190061311566, 0.51238745343929559], [0.77453965957753224, 0.63412987812923882]]])
14865        res=length(arg)        res=length(arg)
14866        ref=numarray.array(2.46349793439)        ref=numarray.array(2.46349793439)
14867        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
14868        self.failUnlessEqual(res.shape,(),"wrong shape of result.")            self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
14869              self.failUnlessEqual(res.shape,(),"wrong shape of result.")
14870        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14871     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14872     def test_length_array_rank4(self):     def test_length_array_rank4(self):
14873        arg=numarray.array([[[[-0.0089365634034204167, -0.84148551298030028, -0.86751121336543813, -0.15969541886143923], [-0.094576010082227269, -0.29859956741061855, -0.9668492649640319, 0.85706900506152772], [-0.53010678888957452, 0.23317712237751809, -0.54934453799322802, 0.63239069375979762]], [[-0.13286296817699417, 0.38304157353272172, 0.94879997873099398, -0.41152562922857516], [-0.084699118599110834, -0.77799719953735957, -0.73697310382304981, -0.57686761933311148], [-0.691418224706843, 0.86481171901741027, -0.65768637189088874, -0.36467431513366044]]], [[[-0.84165953650117875, -0.030676018280178408, 0.68829493775738415, -0.3155228468519129], [-0.7871478173248736, -0.079032190579141126, -0.2177526168512447, -0.22662606238170069], [-0.36280488027671387, -0.30025872969028122, -0.1153990482492997, -0.64384164007636602]], [[0.43765759938201887, -0.83664343730186874, 0.20723950229710386, -0.56690864703827692], [-0.5752004595601341, 0.45715366983278116, -0.60791501104508927, -0.12584705515500483], [0.013022887283654638, -0.82203757609388917, 0.2276716578033573, -0.82649410580263871]]], [[[-0.73587736736778697, -0.075026122599631151, 0.47107705394337485, -0.5188872506774429], [-0.91844772159081667, -0.17389147261342175, -0.53243380583847233, -0.25336755215727336], [-0.7085054821135035, 0.92376667162885795, 0.31427206042606071, 0.58305001351683972]], [[0.021860457140477907, -0.21893493890938442, 0.78089201272561026, -0.30413016651663138], [0.57250768478386815, 0.12062954871057352, -0.39418583967206589, 0.81081960816290599], [-0.62197759509633688, 0.26606514367555634, -0.71790752119252188, -0.75228782860426513]]]])        arg=numarray.array([[[[-0.0089365634034204167, -0.84148551298030028, -0.86751121336543813, -0.15969541886143923], [-0.094576010082227269, -0.29859956741061855, -0.9668492649640319, 0.85706900506152772], [-0.53010678888957452, 0.23317712237751809, -0.54934453799322802, 0.63239069375979762]], [[-0.13286296817699417, 0.38304157353272172, 0.94879997873099398, -0.41152562922857516], [-0.084699118599110834, -0.77799719953735957, -0.73697310382304981, -0.57686761933311148], [-0.691418224706843, 0.86481171901741027, -0.65768637189088874, -0.36467431513366044]]], [[[-0.84165953650117875, -0.030676018280178408, 0.68829493775738415, -0.3155228468519129], [-0.7871478173248736, -0.079032190579141126, -0.2177526168512447, -0.22662606238170069], [-0.36280488027671387, -0.30025872969028122, -0.1153990482492997, -0.64384164007636602]], [[0.43765759938201887, -0.83664343730186874, 0.20723950229710386, -0.56690864703827692], [-0.5752004595601341, 0.45715366983278116, -0.60791501104508927, -0.12584705515500483], [0.013022887283654638, -0.82203757609388917, 0.2276716578033573, -0.82649410580263871]]], [[[-0.73587736736778697, -0.075026122599631151, 0.47107705394337485, -0.5188872506774429], [-0.91844772159081667, -0.17389147261342175, -0.53243380583847233, -0.25336755215727336], [-0.7085054821135035, 0.92376667162885795, 0.31427206042606071, 0.58305001351683972]], [[0.021860457140477907, -0.21893493890938442, 0.78089201272561026, -0.30413016651663138], [0.57250768478386815, 0.12062954871057352, -0.39418583967206589, 0.81081960816290599], [-0.62197759509633688, 0.26606514367555634, -0.71790752119252188, -0.75228782860426513]]]])
14874        res=length(arg)        res=length(arg)
14875        ref=numarray.array(4.74889961553)        ref=numarray.array(4.74889961553)
14876        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
14877        self.failUnlessEqual(res.shape,(),"wrong shape of result.")            self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
14878              self.failUnlessEqual(res.shape,(),"wrong shape of result.")
14879        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14880     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14881     def test_length_constData_rank0(self):     def test_length_constData_rank0(self):
# Line 16732  class Test_util_binary_no_tagged_data(Te Line 16761  class Test_util_binary_no_tagged_data(Te
16761        arg1=numarray.array(4.05252282996)        arg1=numarray.array(4.05252282996)
16762        res=add(arg0,arg1)        res=add(arg0,arg1)
16763        ref=numarray.array(8.25248198451)        ref=numarray.array(8.25248198451)
16764        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
16765        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
16766             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
16767        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16768     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16769     def test_add_float_rank0_array_rank1(self):     def test_add_float_rank0_array_rank1(self):
# Line 16932  class Test_util_binary_no_tagged_data(Te Line 16962  class Test_util_binary_no_tagged_data(Te
16962        arg1=2.36940652044        arg1=2.36940652044
16963        res=add(arg0,arg1)        res=add(arg0,arg1)
16964        ref=numarray.array(4.75258026456)        ref=numarray.array(4.75258026456)
16965        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
16966        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
16967             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
16968        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16969     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16970     def test_add_array_rank1_float_rank0(self):     def test_add_array_rank1_float_rank0(self):
# Line 16977  class Test_util_binary_no_tagged_data(Te Line 17008  class Test_util_binary_no_tagged_data(Te
17008        arg1=numarray.array(0.298008631333)        arg1=numarray.array(0.298008631333)
17009        res=add(arg0,arg1)        res=add(arg0,arg1)
17010        ref=numarray.array(0.293241598371)        ref=numarray.array(0.293241598371)
17011        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
17012        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
17013             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
17014        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17015     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17016     def test_add_array_rank1_array_rank0(self):     def test_add_array_rank1_array_rank0(self):
# Line 21490  class Test_util_binary_no_tagged_data(Te Line 21522  class Test_util_binary_no_tagged_data(Te
21522        arg1=numarray.array(-2.11122757215)        arg1=numarray.array(-2.11122757215)
21523        res=mult(arg0,arg1)        res=mult(arg0,arg1)
21524        ref=numarray.array(-2.83121123046)        ref=numarray.array(-2.83121123046)
21525        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
21526        self.failUnlessEqual(res.shape,(),"wrong shape of result.")            self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
21527              self.failUnlessEqual(res.shape,(),"wrong shape of result.")
21528        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
21529     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
21530     def test_mult_float_rank0_array_rank1(self):     def test_mult_float_rank0_array_rank1(self):
# Line 21690  class Test_util_binary_no_tagged_data(Te Line 21723  class Test_util_binary_no_tagged_data(Te
21723        arg1=2.5079501433        arg1=2.5079501433
21724        res=mult(arg0,arg1)        res=mult(arg0,arg1)
21725        ref=numarray.array(10.5277710171)        ref=numarray.array(10.5277710171)
21726        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
21727        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
21728             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
21729        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
21730     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
21731     def test_mult_array_rank1_float_rank0(self):     def test_mult_array_rank1_float_rank0(self):
# Line 21735  class Test_util_binary_no_tagged_data(Te Line 21769  class Test_util_binary_no_tagged_data(Te
21769        arg1=numarray.array(3.1308073462)        arg1=numarray.array(3.1308073462)
21770        res=mult(arg0,arg1)        res=mult(arg0,arg1)
21771        ref=numarray.array(-8.67590596408)        ref=numarray.array(-8.67590596408)
21772        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
21773        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
21774             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
21775        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
21776     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
21777     def test_mult_array_rank1_array_rank0(self):     def test_mult_array_rank1_array_rank0(self):
# Line 26248  class Test_util_binary_no_tagged_data(Te Line 26283  class Test_util_binary_no_tagged_data(Te
26283        arg1=numarray.array(-4.46156511129)        arg1=numarray.array(-4.46156511129)
26284        res=quotient(arg0,arg1)        res=quotient(arg0,arg1)
26285        ref=numarray.array(0.825966848548)        ref=numarray.array(0.825966848548)
26286        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
26287        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
26288             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
26289        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
26290     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
26291     def test_quotient_float_rank0_array_rank1(self):     def test_quotient_float_rank0_array_rank1(self):
# Line 26448  class Test_util_binary_no_tagged_data(Te Line 26484  class Test_util_binary_no_tagged_data(Te
26484        arg1=-2.69134968237        arg1=-2.69134968237
26485        res=quotient(arg0,arg1)        res=quotient(arg0,arg1)
26486        ref=numarray.array(-0.551023106399)        ref=numarray.array(-0.551023106399)
26487        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
26488        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
26489             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
26490        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
26491     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
26492     def test_quotient_array_rank1_float_rank0(self):     def test_quotient_array_rank1_float_rank0(self):
# Line 26493  class Test_util_binary_no_tagged_data(Te Line 26530  class Test_util_binary_no_tagged_data(Te
26530        arg1=numarray.array(1.50935966986)        arg1=numarray.array(1.50935966986)
26531        res=quotient(arg0,arg1)        res=quotient(arg0,arg1)
26532        ref=numarray.array(-0.292876069981)        ref=numarray.array(-0.292876069981)
26533        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
26534        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
26535             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
26536        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
26537     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
26538     def test_quotient_array_rank1_array_rank0(self):     def test_quotient_array_rank1_array_rank0(self):
# Line 31006  class Test_util_binary_no_tagged_data(Te Line 31044  class Test_util_binary_no_tagged_data(Te
31044        arg1=numarray.array(3.94140059405)        arg1=numarray.array(3.94140059405)
31045        res=power(arg0,arg1)        res=power(arg0,arg1)
31046        ref=numarray.array(152.611109443)        ref=numarray.array(152.611109443)
31047        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
31048        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
31049             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
31050        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
31051     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
31052     def test_power_float_rank0_array_rank1(self):     def test_power_float_rank0_array_rank1(self):
# Line 31186  class Test_util_binary_no_tagged_data(Te Line 31225  class Test_util_binary_no_tagged_data(Te
31225        arg1=1.96628444854        arg1=1.96628444854
31226        res=power(arg0,arg1)        res=power(arg0,arg1)
31227        ref=numarray.array(1.73902851501)        ref=numarray.array(1.73902851501)
31228        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
31229        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
31230             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
31231        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
31232     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
31233     def test_power_array_rank1_float_rank0(self):     def test_power_array_rank1_float_rank0(self):
# Line 31231  class Test_util_binary_no_tagged_data(Te Line 31271  class Test_util_binary_no_tagged_data(Te
31271        arg1=numarray.array(3.32321317072)        arg1=numarray.array(3.32321317072)
31272        res=power(arg0,arg1)        res=power(arg0,arg1)
31273        ref=numarray.array(24.3983890724)        ref=numarray.array(24.3983890724)
31274        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        if not isinstance(res,float):
31275        self.failUnlessEqual(res.shape,(),"wrong shape of result.")           self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
31276             self.failUnlessEqual(res.shape,(),"wrong shape of result.")
31277        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
31278     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
31279     def test_power_array_rank1_array_rank0(self):     def test_power_array_rank1_array_rank0(self):

Legend:
Removed from v.313  
changed lines
  Added in v.341

  ViewVC Help
Powered by ViewVC 1.1.26