/[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 287 by gross, Thu Dec 1 06:40:51 2005 UTC revision 292 by gross, Fri Dec 2 03:11:04 2005 UTC
# Line 60826  class Test_util_overloaded_binary_no_tag Line 60826  class Test_util_overloaded_binary_no_tag
60826        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
60827        self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
60828        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
60829       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
60830       def test_generalTensorProduct_float_rank0_float_rank0_offset0(self):
60831          arg0=-0.816058209277
60832          arg1=-0.334851342127
60833          res=generalTensorProduct(arg0,arg1,offset=0)
60834          ref=0.27325818663014179
60835          self.failUnless(isinstance(res,float),"wrong type of result.")
60836          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
60837       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
60838       def test_generalTensorProduct_float_rank0_array_rank0_offset0(self):
60839          arg0=-0.0378781468644
60840          arg1=numarray.array(-0.223764515469)
60841          res=generalTensorProduct(arg0,arg1,offset=0)
60842          ref=numarray.array(0.008475785179988933)
60843          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
60844          self.failUnlessEqual(res.shape,(),"wrong shape of result.")
60845          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
60846       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
60847       def test_generalTensorProduct_float_rank0_array_rank1_offset0(self):
60848          arg0=0.543146680723
60849          arg1=numarray.array([-0.92731085296922822, -0.36581780458574942])
60850          res=generalTensorProduct(arg0,arg1,offset=0)
60851          ref=numarray.array([-0.50366581178893521, -0.19869272631023729])
60852          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
60853          self.failUnlessEqual(res.shape,(2,),"wrong shape of result.")
60854          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
60855       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
60856       def test_generalTensorProduct_float_rank0_array_rank2_offset0(self):
60857          arg0=-0.559404776535
60858          arg1=numarray.array([[-0.73633376974850639, -0.068583989340989415, -0.58700884536720088, 0.41828463778594793, -0.13130077394080808], [0.21022430355207389, -0.89023705295881594, -0.98599053548811422, -0.011942717529535241, -0.49444669262957119], [0.32064546170075658, 0.68151799398521828, 0.58093384094003797, -0.84765413248022803, -0.53426528691691533], [-0.97631867410054096, -0.76752519044492384, -0.38935877053278678, -0.1817765419702333, -0.63370674570498831]])
60859          res=generalTensorProduct(arg0,arg1,offset=0)
60860          ref=numarray.array([[0.41190862792168437, 0.038366211231207328, 0.32837555196698404, -0.23399042432886874, 0.073450280105292171], [-0.11760047955087297, 0.49800285967402291, 0.55156781517081821, 0.0066808132308359171, 0.27659584159914813], [-0.17937060284982476, -0.38124442113020368, -0.32497716547295497, 0.47418177055947069, 0.29887055343841645], [0.54615732971262076, 0.42935725764618765, 0.21780915602201942, 0.10168666584024907, 0.35449858047011973]])
60861          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
60862          self.failUnlessEqual(res.shape,(4, 5),"wrong shape of result.")
60863          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
60864       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
60865       def test_generalTensorProduct_float_rank0_array_rank3_offset0(self):
60866          arg0=-0.959498524214
60867          arg1=numarray.array([[[0.027563264138124266, -0.86134683154644165], [-0.8117329937722968, -0.82085247002658135]], [[0.16560117669229291, -0.13409471539984441], [0.84610060594912695, 0.27635482631912045]], [[-0.30630109192629895, 0.65944726866182668], [-0.79975424716626953, -0.52724052564802748]], [[-0.71815840628111416, -0.060534894755772006], [-0.32528952507958842, -0.4407791883975869]], [[-0.11672438023008391, 0.98658294864906182], [-0.7586019012956271, -0.70780594519726536]], [[-0.27061897876441532, 0.50264763097728116], [-0.13069146868469272, -0.93327923188153727]]])
60868          res=generalTensorProduct(arg0,arg1,offset=0)
60869          ref=numarray.array([[[-0.026446911263045492, 0.82646101370504654], [0.77885660958017144, 0.78760673358776034]], [[-0.15889408464432439, 0.12866368153102073], [-0.81183228274459229, -0.2651620480125581]], [[0.29389544566836046, -0.63273868107784637], [0.76736301988975719, 0.50588650626499243]], [[0.68907193097846631, 0.058083142181601162], [0.31211481925607415, 0.42292698077164276]], [[0.11199687057053639, -0.94662488324327765], [0.72787740475893981, 0.67913875984653249]], [[0.25965851074870316, -0.48228966012226587], [0.12539827133029721, 0.89548004566972728]]])
60870          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
60871          self.failUnlessEqual(res.shape,(6, 2, 2),"wrong shape of result.")
60872          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
60873       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
60874       def test_generalTensorProduct_float_rank0_array_rank4_offset0(self):
60875          arg0=-0.9304595906
60876          arg1=numarray.array([[[[-0.71233817194649296, 0.99590387266544389, -0.54947329367573428, 0.13512463808082553], [-0.0096671503124188263, -0.71547424252371372, -0.87762902434985546, -0.51167011163989562], [-0.53976710827994245, -0.81722257339839532, 0.66609455953777674, -0.3012912274862769]], [[-0.3835829449196122, 0.40197040371247073, -0.35580710017866091, -0.22359872548955528], [0.89475596756920872, -0.038969787629618002, 0.42318904869360141, -0.62860155992094824], [0.18493393151046011, 0.30831212239060291, -0.97294385206858314, 0.34374933089323689]]], [[[0.75135090873481869, 0.84105513930538378, 0.96419194632206584, 0.4852944932936063], [0.91295235140726794, -0.31225039241780017, 0.72482670566986074, -0.86549920269175828], [0.79904918654713297, 0.20271226330974756, 0.86916793104369861, 0.97625696820391017]], [[0.84237487359749474, 0.19875587560825458, -0.1370588278661049, 0.48021237433557817], [0.93576386199601491, -0.29835765385660262, -0.28932131971598651, -0.35577113589894438], [-0.54706437371089223, 0.9747796823610706, -0.69765793608042537, 0.73540906219094726]]], [[[-0.57475948602306959, 0.31447138930161533, 0.55698363425662079, 0.7023790406039192], [-0.49766651685862384, 0.72614255431525354, 0.9196332538458043, 0.21160591767894599], [0.66872133503379083, -0.17608099285829648, -0.43372494211856294, -0.14815693304419097]], [[-0.86705044864551706, 0.55419517665074491, -0.16633978403913985, -0.56691172352847152], [-0.60732289573658971, 0.11286145485281507, -0.2159763164709434, 0.13593235955593097], [-0.43283967020676672, 0.24820403897102916, -0.90853794595044901, -0.50887126866884214]]]])
60877          res=generalTensorProduct(arg0,arg1,offset=0)
60878          ref=numarray.array([[[[0.66280188383834704, -0.92664830963760803, 0.51126269587935846, -0.12572801542870757], [0.0089948927219654223, 0.66571987078372175, 0.81659834269556519, 0.47608836259890092], [0.50223148258969874, 0.7603925810736486, -0.61977407116865091, 0.280339312178363]], [[0.35690842989118515, -0.3740172172717694, 0.33106412876494029, 0.20804957857777526], [-0.83253427127168034, 0.036259812643637576, -0.39376030899400677, 0.584888350094797], [-0.17207355020133885, -0.28687197117669033, 0.90528493827287704, -0.31984486169207099]]], [[[-0.69910165893861242, -0.78256782059042129, -0.8971416436349996, -0.45154691555058102], [-0.84946527112804804, 0.29053637229387003, -0.67442195981379072, 0.80531203380151672], [-0.7434829789842009, -0.18861556952886133, -0.80872563728188707, -0.90836765895576488]], [[-0.78379578001956007, -0.18493431064787386, 0.12752770086446202, -0.4468182092255118], [-0.87069045993142946, 0.27760974045990022, 0.26920179669489441, 0.33103066545595899], [0.50902129319508249, -0.9069931041752366, 0.64914251758448893, -0.68426841492998791]]], [[[0.53479047605870211, -0.29260292014510936, -0.5182507643015194, -0.65353531456660052], [0.46305858353178531, -0.67564630380567492, -0.85568158087584967, -0.19689075553216687], [-0.62221817962127124, 0.16383624852743653, 0.40356353207680556, 0.13785403926490378]], [[0.80675540547657154, -0.51565621717914967, 0.15477244735761136, 0.52748845018084956], [0.56508941292929604, -0.10501302307691202, 0.20095723500292909, -0.1264795676217533], [0.40273982233618566, -0.2309438284863411, 0.8453578452339523, 0.47348415231389973]]]])
60879          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
60880          self.failUnlessEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
60881          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
60882       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
60883       def test_generalTensorProduct_float_rank0_Symbol_rank0_offset0(self):
60884          arg0=0.562491357932
60885          arg1=Symbol(shape=())
60886          res=generalTensorProduct(arg0,arg1,offset=0)
60887          s1=numarray.array(0.00324768537641)
60888          sub=res.substitute({arg1:s1})
60889          ref=numarray.array(0.0018267949575127625)
60890          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
60891          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
60892          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
60893       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
60894       def test_generalTensorProduct_float_rank0_Symbol_rank1_offset0(self):
60895          arg0=0.91409519904
60896          arg1=Symbol(shape=(2,))
60897          res=generalTensorProduct(arg0,arg1,offset=0)
60898          s1=numarray.array([0.25097568619682953, 0.66141307495224799])
60899          sub=res.substitute({arg1:s1})
60900          ref=numarray.array([0.22941566982832673, 0.60459451639622652])
60901          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
60902          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
60903          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
60904       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
60905       def test_generalTensorProduct_float_rank0_Symbol_rank2_offset0(self):
60906          arg0=-0.311325649398
60907          arg1=Symbol(shape=(4, 5))
60908          res=generalTensorProduct(arg0,arg1,offset=0)
60909          s1=numarray.array([[-0.53341277380602681, 0.052789259508221553, -0.46627917301069455, 0.40862339417134952, 0.15143180032582815], [0.54096274036698166, -0.82847910456928209, 0.55799114401979533, 0.065333685515621687, -0.4530989159792318], [-0.39265311994330632, 0.24478822309545256, -0.80333346366189651, -0.95364825169535239, 0.96393006642570644], [-0.67841811398166496, -0.080815522855093525, 0.67452861057759494, 0.63833330100743257, -0.60552157272965412]])
60910          sub=res.substitute({arg1:s1})
60911          ref=numarray.array([[0.16606507820234179, -0.01643465049763583, 0.14516466633830988, -0.12721494354960419, -0.047144603575944445], [-0.16841557644486413, 0.25792679524269291, -0.17371695527028735, -0.02034005207071465, 0.1410613142587574], [0.12224298755449474, -0.076208852520170609, 0.25009831225767254, 0.29689516125630866, -0.30009615390422589], [0.21120895989869806, 0.025159945134299692, -0.2099980577255903, -0.19872952946849839, 0.18851439685454879]])
60912          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
60913          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
60914          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
60915       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
60916       def test_generalTensorProduct_float_rank0_Symbol_rank3_offset0(self):
60917          arg0=0.948217578168
60918          arg1=Symbol(shape=(6, 2, 2))
60919          res=generalTensorProduct(arg0,arg1,offset=0)
60920          s1=numarray.array([[[0.98956741355064559, -0.066566677430423216], [0.18490642626135512, 0.084333580416641851]], [[-0.38416624166659097, 0.8916666431591378], [0.92443095579442658, -0.95236048247261551]], [[0.090214611115947196, 0.32155545842962718], [-0.89091389581014746, -0.13578318477225881]], [[-0.80325400851047579, -0.68882946382410637], [0.67724602964181235, 0.26516640136299263]], [[-0.25182151850795664, 0.60267348542466626], [-0.32739949654327516, 0.9846936281180958]], [[-0.32951069619917894, -0.19958050878192046], [0.22979437488771959, 0.40330955678907743]]])
60921          sub=res.substitute({arg1:s1})
60922          ref=numarray.array([[[0.93832521631142629, -0.063119693659797402], [0.17533152369732824, 0.079966583380943729]], [[-0.36427318328717662, 0.84549398490996364], [0.87656168208735175, -0.90304495023353559]], [[0.085543080067773447, 0.30490453803899203], [-0.84478021664173131, -0.12875200262075262]], [[-0.76165957060391598, -0.65316020595837732], [0.64217659005116867, 0.25143544291206438]], [[-0.23878159041032027, 0.57146559277572551], [-0.31044595770583955, 0.93370380729206115]], [[-0.3124478343305907, -0.18924574668682295], [0.21789506563277009, 0.38242521119073652]]])
60923          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
60924          self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
60925          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
60926       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
60927       def test_generalTensorProduct_float_rank0_Symbol_rank4_offset0(self):
60928          arg0=-0.830323568577
60929          arg1=Symbol(shape=(3, 2, 3, 4))
60930          res=generalTensorProduct(arg0,arg1,offset=0)
60931          s1=numarray.array([[[[0.92676883544399891, -0.95357774937706141, 0.44347735429402935, -0.53674237545550874], [-0.53618249287540465, 0.054049986177377995, 0.72613620912428045, -0.28868935976044963], [0.20433401785227878, 0.27989385328052796, -0.3658661214474892, -0.75219187171324098]], [[-0.63438082192292056, -0.27326168466178813, -0.57030787945284733, 0.91431123438277839], [-0.53016547615535026, 0.29706122745133667, -0.8448922838417019, 0.98820530445796062], [0.65022989699942624, -0.18844283546637386, -0.47823095324118414, -0.51899670756954275]]], [[[-0.3559753902541265, -0.69420800259668458, -0.33725718940187477, -0.72032568863041679], [-0.075850351806678207, 0.99922387833838888, 0.30593283824914952, -0.83367628611194378], [-0.4885046491104339, -0.59346613300382312, 0.33205663307371358, -0.1422627978413098]], [[0.21495156425639994, -0.65773972125079339, -0.76226004103345057, 0.84364839691041404], [-0.55673769626116831, -0.13335088242311155, 0.67181611603927371, -0.21087210630906528], [-0.69602070926428317, -0.81184445666761773, -0.40347003250595415, 0.1046531171453815]]], [[[0.94481376866460276, 0.43015674438105722, 0.95064531378740225, -0.6933804604356999], [-0.30034452340652074, 0.48851034708096575, 0.35779832302502368, -0.39943794345218087], [-0.53735828002736974, -0.96196465128721043, -0.32324088295403741, -0.64525597145923785]], [[0.39078335151136634, -0.76954000771915809, 0.53002063914038744, 0.98370783019272001], [0.61744183260742247, -0.72158480396307612, -0.32831391466301851, -0.54773198963454428], [0.13277046692417094, -0.39115875964425006, 0.28530880796795333, -0.29975932254106996]]]])
60932          sub=res.substitute({arg1:s1})
60933          ref=numarray.array([[[[-0.7695180066917473, 0.7917780797783196, -0.36822969940047423, 0.44566984459467673], [0.44520496089278067, -0.044878977404334268, -0.60292800843299688, 0.23970557940648587], [-0.16966335088476636, -0.2324024630786358, 0.3037872635816799, 0.62456263917549903]], [[0.52674134789580573, 0.22689561716371981, 0.47354007365483014, -0.75917416692268691], [0.440208890097598, -0.24665693846323711, 0.70153397618255486, -0.82053015488418601], [-0.53990120847197365, 0.15646852761719493, 0.39708643169916724, 0.43093519830882043]]], [[[0.29557475636137182, 0.57641726605074217, 0.28003259303239042, 0.59810339632124265], [0.062980334789936684, -0.82967913646921176, -0.25402324599990272, 0.69222106892243129], [0.40561692351579676, 0.49276891738528572, -0.27571444854340627, 0.1181241539793348]], [[-0.1784793499045674, 0.54613679254375436, 0.63292247745449226, -0.70050114754686177], [0.46227243072087254, 0.11072438056644067, -0.55782475489722305, 0.17509207982387695], [0.57792239911976584, 0.67409358638965566, 0.33501067720419403, -0.086895949690852722]]], [[[-0.78450114003821148, -0.35716928304191398, -0.78934320939489178, 0.57573013829048558], [0.24938313647743976, -0.40562165467502242, -0.29708838040497898, 0.33166273863224499], [0.44618124467668718, 0.79874192210165917, 0.26839452344435427, 0.53577124086760841]], [[-0.32447662696737073, 0.63896720537209006, -0.44008862851047204, -0.81679579600268848], [-0.51267650583927482, 0.59914886945750623, 0.27260678123645937, 0.45479478025709713], [-0.11024244789810295, 0.32478833718793959, -0.2368986275783812, 0.24889723040650436]]]])
60934          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
60935          self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
60936          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
60937       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
60938       def test_generalTensorProduct_float_rank0_constData_rank0_offset0(self):
60939          arg0=0.492353721328
60940          arg1=Data(-0.437214319534,self.functionspace)
60941          res=generalTensorProduct(arg0,arg1,offset=0)
60942          ref=Data(-0.21526409724074577,self.functionspace)
60943          self.failUnless(isinstance(res,Data),"wrong type of result.")
60944          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
60945          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
60946       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
60947       def test_generalTensorProduct_float_rank0_constData_rank1_offset0(self):
60948          arg0=0.979385563268
60949          arg1=Data(numarray.array([0.22021089255261517, 0.058911120671208295]),self.functionspace)
60950          res=generalTensorProduct(arg0,arg1,offset=0)
60951          ref=Data(numarray.array([0.21567136904043174, 0.057696701101331072]),self.functionspace)
60952          self.failUnless(isinstance(res,Data),"wrong type of result.")
60953          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
60954          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
60955       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
60956       def test_generalTensorProduct_float_rank0_constData_rank2_offset0(self):
60957          arg0=0.893109236094
60958          arg1=Data(numarray.array([[0.24257610887747383, -0.65008541717841628, 0.48802129697853314, 0.30692856887415387, -0.19693437626450594], [0.13995561961849101, -0.84910283958592947, 0.75493100427342497, -0.49757304316066131, -0.19063332091428498], [-0.79406208009322277, 0.19120266450540702, -0.45800904239997786, 0.97077527365053884, -0.093067565850555312], [-0.48333222905652629, 0.33404120334791765, -0.95795583626960612, -0.73075610350636455, -0.21982935302054085]]),self.functionspace)
60959          res=generalTensorProduct(arg0,arg1,offset=0)
60960          ref=Data(numarray.array([[0.21664696329411298, -0.58059729033178953, 0.43585632774189431, 0.27412073968249034, -0.17588391034615794], [0.12499565652447372, -0.75834158842747634, 0.67423585252999541, -0.44438708047797454, -0.17025637961573875], [-0.70918417776293485, 0.17076486563548052, -0.40905210598179487, 0.86700836306856577, -0.083119502641878118], [-0.4316684778720799, 0.29833528394583791, -0.85555920514213146, -0.65264502537328806, -0.19633162554712047]]),self.functionspace)
60961          self.failUnless(isinstance(res,Data),"wrong type of result.")
60962          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
60963          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
60964       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
60965       def test_generalTensorProduct_float_rank0_constData_rank3_offset0(self):
60966          arg0=-0.924871621274
60967          arg1=Data(numarray.array([[[-0.49196475442088961, -0.89958484497998437], [0.03667241962030432, -0.91332100267882388]], [[-0.068836761067621488, -0.8937589667158885], [0.352093300296908, -0.81959241996961585]], [[-0.80055182544351133, -0.3773665122896539], [-0.69441106223348092, -0.63654140604730358]], [[0.42481016174814346, -0.45547410821063816], [0.74132831354824424, 0.31652739609917768]], [[0.38927838785348512, 0.61511029145913154], [0.067559642866422021, -0.36889709018737538]], [[-0.71710685925061046, -0.93229262781841427], [-0.14607137297036554, 0.76869118084057808]]]),self.functionspace)
60968          res=generalTensorProduct(arg0,arg1,offset=0)
60969          ref=Data(numarray.array([[[0.45500424003079537, 0.83200049404994214], [-0.033917280190262501, 0.84470467649093994]], [[0.063665166811845531, 0.82661230457448431], [-0.32564110148523012, 0.75801777024098305]], [[0.74040766471160846, 0.3490155780357565], [0.64224108495831334, 0.58871908221884839]], [[-0.39289486302957366, 0.42125507690899289], [-0.68563351924750693, -0.29274720600780807]], [[-0.36003253370088834, -0.56889805252398207], [-0.062483996430543948, 0.34118244988477031]], [[0.66323178354164614, 0.86225099419199092], [0.13509726754078608, -0.71094065868286649]]]),self.functionspace)
60970          self.failUnless(isinstance(res,Data),"wrong type of result.")
60971          self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
60972          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
60973       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
60974       def test_generalTensorProduct_float_rank0_constData_rank4_offset0(self):
60975          arg0=-0.654494887933
60976          arg1=Data(numarray.array([[[[-0.31265817991493638, -0.56344925108921839, -0.57407369384449813, 0.028201611177590236], [-0.38160761903964802, -0.94776552441561646, 0.12952381532000024, 0.99370451175785579], [-0.45670830806395868, -0.4269561068126726, -0.3197087826645344, -0.56291971481992209]], [[0.0099674773600433308, -0.79509036110792475, 0.12830933951956824, -0.71959824965957853], [-0.057384362906059749, -0.12489982212229056, 0.75546275888631653, 0.60256192749401727], [0.94843178641124792, -0.32002343091073437, 0.36892162742911272, 0.42888548418981642]]], [[[-0.2571586475956773, -0.6554762697408425, -0.80029997202655712, 0.63741645520041756], [-0.96452873606684619, 0.22876390981988015, 0.19455884399440571, -0.030775884405276566], [-0.65171657793426574, -0.91060004615194057, 0.23746336000046475, -0.97272499257481537]], [[0.66919098226677409, -0.79235908747095452, -0.12370863164652168, -0.64863084247180791], [0.07763296595450031, 0.025873684646505968, -0.55172752736832331, 0.30779290739216703], [-0.45176445022090106, -0.36574516631567411, 0.61968281176274198, -0.7996747868985763]]], [[[-0.21325609084379304, -0.92770142734538341, -0.80644823451720549, -0.021573294263919518], [-0.56304400996409343, 0.88063022592481244, 0.53014487801115928, 0.65994018859582404], [-0.23765598450411773, 0.45571357522494549, 0.86787085427924882, 0.33054855747647127]], [[-0.14130841318382781, -0.097733741841565136, -0.90093713704584788, -0.59209444992807092], [-0.9823260800621505, -0.89018187293512185, -0.87797797897766827, -0.66633877208399461], [0.45851185562387342, -0.82922164076306015, 0.27949294872833819, 0.82705868854527842]]]]),self.functionspace)
60977          res=generalTensorProduct(arg0,arg1,offset=0)
60978          ref=Data(numarray.array([[[[0.20463318042481957, 0.36877465444767443, 0.37572829791814377, -0.018457810347212149], [0.2497602358578036, 0.62030769068933422, -0.084772674992541971, -0.65037452306165711], [0.29891325290447474, 0.27944058928074866, 0.20924776388127911, 0.36842807566644481]], [[-0.0065236629777381087, 0.52038257679008604, -0.083977806789640674, 0.47097337576786119], [0.037557772169318736, 0.081746295082803178, -0.49444651371499376, -0.39437370120800019], [-0.62074375575949925, 0.20945369954991414, -0.24145731920034499, -0.28070335691098325]]], [[[0.16830902023918198, 0.4290058677068942, 0.52379224050445183, -0.41718581141316469], [0.63127912702040612, -0.14972480952071948, -0.12733776879652839, 0.020142659014876111], [0.42654516863928543, 0.59598307515816651, -0.1554185551917415, 0.63664353500506099]], [[-0.43798207694458963, 0.51859497215714234, 0.080966667005857751, 0.42452557055359263], [-0.05081037935231137, -0.016934194333133468, 0.36110284619458349, -0.20144888443026523], [0.29567752321952512, 0.23937834163988086, -0.40557923243877619, 0.52338306003417645]]], [[[0.13957502127787724, 0.60717584172587158, 0.52781624687425255, 0.014119610811613606], [0.36850942620289984, -0.57636798102723463, -0.34697711252226521, -0.43192747977762819], [0.15554462694467305, -0.29826220534648129, -0.56801703751197363, -0.2163423410820387]], [[0.092485634050765445, 0.063966234413885908, 0.58965875054566586, 0.387522790651533], [0.6429273976841211, 0.58261948516682438, 0.57463209895879241, 0.43611531996064951], [-0.30009366556258327, 0.54272132484298996, -0.18292670615606885, -0.5413056836736081]]]]),self.functionspace)
60979          self.failUnless(isinstance(res,Data),"wrong type of result.")
60980          self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
60981          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
60982       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
60983       def test_generalTensorProduct_float_rank0_expandedData_rank0_offset0(self):
60984          arg0=0.817315288431
60985          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
60986          arg1=msk_arg1*(-0.107441089832)+(1.-msk_arg1)*(-0.984717408273)
60987          res=generalTensorProduct(arg0,arg1,offset=0)
60988          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
60989          ref=msk_ref*numarray.array(-0.087813245324982178)+(1.-msk_ref)*numarray.array(-0.80482459256581285)
60990          self.failUnless(isinstance(res,Data),"wrong type of result.")
60991          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
60992          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
60993       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
60994       def test_generalTensorProduct_float_rank0_expandedData_rank1_offset0(self):
60995          arg0=-0.731273459059
60996          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
60997          arg1=msk_arg1*numarray.array([0.32690953465836348, -0.45530172275332514])+(1.-msk_arg1)*numarray.array([-0.88987813857334852, -0.4432112304820599])
60998          res=generalTensorProduct(arg0,arg1,offset=0)
60999          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
61000          ref=msk_ref*numarray.array([-0.23906026620885493, 0.33295006571315844])+(1.-msk_ref)*numarray.array([0.65074426453515033, 0.32410860960822918])
61001          self.failUnless(isinstance(res,Data),"wrong type of result.")
61002          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61003          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61004       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61005       def test_generalTensorProduct_float_rank0_expandedData_rank2_offset0(self):
61006          arg0=0.360959926398
61007          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
61008          arg1=msk_arg1*numarray.array([[0.21279479867851991, -0.79951867079866279, -0.51299350043200365, 0.43341112620605893, 0.43115383961180132], [0.095600939708326615, -0.62487659659900729, -0.8972300314905306, 0.70070531945488557, -0.043889499904746776], [0.036459699641055776, 0.36036292372913703, 0.76467901872563138, -0.94350337048486743, 0.64310715960498266], [-0.52886376314585903, -0.55067938504224667, -0.62817382273271871, -0.28542028247487106, -0.93139070440443028]])+(1.-msk_arg1)*numarray.array([[-0.41945831254126453, 0.74812933596756603, 0.024606024120077175, 0.30230913992714581, -0.83094099057447934], [-0.93950985371619633, 0.1289378703502706, -0.091682152683265628, 0.83274570145517623, -0.78477292031180745], [-0.31532918040306912, -0.73226858806142991, -0.018223951762351032, -0.71913243020658002, 0.99376692794750765], [-0.46929748118089498, 0.49015272355041128, 0.49943394318132239, 0.70263478992839801, 0.64512615939951812]])
61009          res=generalTensorProduct(arg0,arg1,offset=0)
61010          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
61011          ref=msk_ref*numarray.array([[0.07681039486886862, -0.28859420056528523, -0.18517009615857116, 0.15644404821539876, 0.15562925821247639], [0.034508108160693995, -0.22555541031618939, -0.32386408612886697, 0.25292654053709901, -0.015842350655260948], [0.013160490498927454, 0.13007657442582526, 0.27601848231727305, -0.34056690716645094, 0.23213591299701974], [-0.1908986250196808, -0.19877319029372675, -0.22674557681873131, -0.10302528415461623, -0.33619472010957319]])+(1.-msk_ref)*numarray.array([[-0.15140764162191003, 0.27004471004701208, 0.0088817886553296428, 0.10912148489753506, -0.29993639879881734], [-0.33912540764756238, 0.046541404191544206, -0.033093583084558675, 0.30058782710548326, -0.28327157555486715], [-0.11382119774942288, -0.26431961565019652, -0.0065781162868183175, -0.25957798907775781, 0.35871003716866551], [-0.16939758426580687, 0.17692549101651922, 0.18027563937137625, 0.25362300205720512, 0.23286469101425278]])
61012          self.failUnless(isinstance(res,Data),"wrong type of result.")
61013          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
61014          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61015       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61016       def test_generalTensorProduct_float_rank0_expandedData_rank3_offset0(self):
61017          arg0=0.460701578466
61018          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
61019          arg1=msk_arg1*numarray.array([[[0.54899887614412735, 0.61695096532471561], [0.42902761477167273, 0.53516312400600285]], [[0.34321063427267418, 0.74380368798820795], [0.31540686527488004, -0.80432967300638936]], [[0.8394622964445968, 0.28392277440231517], [-0.33424678334360336, -0.066072706587715802]], [[-0.73373584571143158, -0.54187213946866164], [0.20402337375362967, -0.36147631706777439]], [[0.025149006205081648, 0.24833725969162024], [0.11408358615465741, 0.88899127442537362]], [[-0.090389209416217309, 0.26603033945702514], [-0.86492517119016843, -0.76494342510693047]]])+(1.-msk_arg1)*numarray.array([[[0.38159118801718828, -0.17804225869194479], [0.44387615914706902, -0.46254001770783448]], [[0.33391775245439814, 0.90997515595679168], [-0.099210191102322209, 0.63824730355994697]], [[0.94948895681219558, 0.47237233803777778], [0.10390798726523331, 0.51199456724475523]], [[-0.45550582497404379, 0.15986250058221763], [0.3438598995629607, -0.77259614029062695]], [[0.67624092130153546, 0.43614859456114963], [-0.98236612768868814, 0.55899862257148825]], [[-0.74765636708258953, 0.093812196029846584], [-0.20196712295659558, -0.58464411474345512]]])
61020          res=generalTensorProduct(arg0,arg1,offset=0)
61021          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
61022          ref=msk_ref*numarray.array([[[0.25292464881576143, 0.28423028356133345], [0.19765369933089225, 0.24655049596646056]], [[0.15811768095580175, 0.34267153312513765], [0.1453084406912088, -0.37055594996123453]], [[0.38674160503487481, 0.13080367032964532], [-0.15398802068364323, -0.030439800218493813]], [[-0.33803326229647818, -0.24964134998006152], [0.093993890332293745, -0.16653270985126706]], [[0.011586186855537013, 0.1144093675318965], [0.052558488218533754, 0.40955968337043563]], [[-0.041642451454361927, 0.12256059730774667], [-0.39847239162244641, -0.35241064338409334]]])+(1.-msk_ref)*numarray.array([[[0.17579966264830565, -0.082024349613063929], [0.20449444716256251, -0.21309291626177682]], [[0.15383643563362226, 0.41922699071430736], [-0.045706291640771765, 0.2940415402018543]], [[0.43743106113959046, 0.21762268175776686], [0.047870573748337301, 0.23587670529577037]], [[-0.20985225256608406, 0.073648906355779184], [0.15841679849988005, -0.35593626134877443]], [[0.31154525986704501, 0.20093434596013007], [-0.45257762565789311, 0.25753154777910819]], [[-0.34444646846524291, 0.043219426790329557], [-0.093046572344377784, -0.26934646650327554]]])
61023          self.failUnless(isinstance(res,Data),"wrong type of result.")
61024          self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
61025          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61026       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61027       def test_generalTensorProduct_float_rank0_expandedData_rank4_offset0(self):
61028          arg0=0.784374548175
61029          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
61030          arg1=msk_arg1*numarray.array([[[[-0.90066927489131876, -0.1878533156916542, -0.59694523049679371, 0.72172638004705458], [0.43240312937102132, -0.13129148954521397, -0.56659689512004441, 0.73070004905350916], [-0.69413612468093455, -0.42386294361359211, -0.16373619790315486, 0.29396503282525854]], [[0.63129930928189593, 0.46134620780199342, -0.54540114997909495, -0.99570985746853435], [-0.42410817885551055, -0.3197610798525401, -0.52261060185934016, 0.3800995849889357], [0.23309633169638544, -0.14220779059692501, 0.67437183748558427, 0.66400661133603367]]], [[[0.95301604528523898, 0.44783390626244168, 0.66854797756177331, -0.73974685438936039], [-0.039463004415484448, -0.51600084748783526, -0.016360924329686499, 0.41712475114362069], [0.53457162281142012, 0.61051584302119832, -0.41824942120758601, 0.93056070139777969]], [[0.24214706167067845, 0.44711603020288027, 0.12713667042831944, -0.45911885553102172], [-0.90454927042871036, 0.92137663178187656, 0.043620737006642374, 0.14858975911746897], [0.091386022828089386, 0.52565798890642301, 0.88050542742087501, 0.17773357292037728]]], [[[0.69079441729603985, -0.2366215804326115, -0.75270404082148401, -0.3064845139073471], [0.030604832318570807, 0.8076694815171781, -0.41126928764355308, -0.60305476385054346], [0.87808093962682476, -0.67989393718579905, -0.30799513849552373, -0.013741421259001019]], [[-0.02352341183500406, 0.94502612799375796, -0.34204026680763322, 0.68878510202234078], [0.69059482886993284, 0.53344010160184108, 0.034253916177040766, 0.33325848459854823], [0.13793314057353512, -0.50974887540980696, -0.37881088325214796, 0.94047672177021813]]]])+(1.-msk_arg1)*numarray.array([[[[0.58649064480268387, 0.1553497755096267, 0.91854259329782217, 0.2567973933780654], [-0.22563953102189838, 0.12872158640774867, -0.88923251502378253, -0.046050599461417541], [0.08360342295121681, -0.094708790395032105, -0.55305030205236494, -0.57352186464112576]], [[-0.86421349852991436, -0.57959800013126106, -0.56765879912871453, -0.5793629140992389], [0.44733466091869878, 0.17296098727803111, -0.38704753152222282, -0.063316911212001559], [-0.80300394716403201, 0.18272341166141337, -0.48077928437016659, 0.8426094766450376]]], [[[-0.42353165706394535, -0.99814635688525977, 0.44639643837548326, 0.17533350802389069], [0.3903526484974027, -0.68762456688689766, 0.059015447607134952, -0.56039875901037384], [0.43364147648970786, -0.34938403943126994, 0.70459617381735562, 0.2564937912679659]], [[0.83741112510024718, -0.23562155256082784, -0.20672187238999595, -0.85959771540048013], [-0.47722342901549109, -0.028854042984841843, 0.44566963226943268, -0.25216641587477873], [0.47805932138545626, -0.35957607104467737, -0.13669450407909722, -0.44083080747298431]]], [[[0.25404535302439712, 0.71750765779505032, -0.78968487605459647, -0.25599841278627555], [0.95030212417116089, 0.16916124879325034, -0.96299006099109752, 0.051273810341706305], [-0.099801382561338636, -0.24966458030138017, -0.58025100729329537, 0.1602631091128075]], [[-0.63613006417582807, -0.56605379211879847, 0.7966572261877094, -0.12946642218948567], [0.097043582654898097, -0.010020676619000302, 0.071892565137961162, 0.78315181813034029], [0.068437370712741918, 0.22446399438934228, 0.49297329176941385, 0.9618124192862052]]]])
61031          res=generalTensorProduct(arg0,arg1,offset=0)
61032          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
61033          ref=msk_ref*numarray.array([[[[-0.70646205554816099, -0.14734735961885401, -0.46822864545626175, 0.56610380325552934], [0.33916600922993634, -0.10298170279127589, -0.44442418360725466, 0.57314252082794093], [-0.54446270916869066, -0.33246730488512055, -0.12843050625021182, 0.2305786898016193]], [[0.49517511048130142, 0.36186822329702939, -0.42779878058908577, -0.78100946956547201], [-0.33265966116719697, -0.25081245253334944, -0.409922454704988, 0.29814044023727654], [0.18283482985564831, -0.11154417149645617, 0.52896010532983295, 0.52082988575204547]]], [[[0.74752152992432297, 0.35126951788213651, 0.52439201783345812, -0.58023860467567823], [-0.030953776258031442, -0.40473793160628979, -0.012833092628826445, 0.32718203821096919], [0.4193043751099898, 0.47887308852355231, -0.3280642007842382, 0.7299081297084784]], [[0.18993399208989012, 0.35070643417227221, 0.099722768423712069, -0.360121144865859], [-0.70950542529472427, 0.72270437925309483, 0.034214995880654235, 0.11655002517122616], [0.0716808703653109, 0.41231274754315855, 0.69064604679905806, 0.13940969095498446]]], [[[0.54184155894853014, -0.18559994524033083, -0.59040189192899695, -0.24039865211877043], [0.024005651521856661, 0.63351538463993262, -0.32258916167374729, -0.47302080792017048], [0.68874434028104359, -0.53329149978716728, -0.24158354759758383, -0.010778421091313979]], [[-0.018451165529620405, 0.74125444215886038, -0.26828767973496132, 0.54026550318858091], [0.54168500686698151, 0.41841683867247559, 0.026867900024597442, 0.26139947328253732], [0.10819124481575262, -0.39983404383238241, -0.29712961539475108, 0.7376860037078059]]]])+(1.-msk_ref)*numarray.array([[[[0.46002833452608544, 0.12185240997448181, 0.72048143159765354, 0.20142533940348853], [-0.17698590519576501, 0.10096593617897251, -0.697491352194474, -0.036120918145746382], [0.065576397103260631, -0.074287164674322795, -0.43379858079048028, -0.44985595344647983]], [[-0.67786707243630839, -0.454621919476206, -0.44525711408426072, -0.4544375239760563], [0.35087792254120959, 0.13566619624814175, -0.30359023266006907, -0.049664173623762825], [-0.62985585823968782, 0.14332359346295173, -0.37711103394984424, 0.66092142753159111]]], [[[-0.33220745214742486, -0.7829205976945951, 0.35014200465778711, 0.13752714113621164], [0.30618268229414197, -0.53935520896607625, 0.046290215052203522, -0.43956252339670343], [0.34013733719164019, -0.27404794806852778, 0.55266730548396126, 0.2011872016355542]], [[0.65684397288739027, -0.1848155488302379, -0.16214737525383394, -0.67424656962968366], [-0.37432191151264432, -0.022632376929263051, 0.34957191644674274, -0.19779291851673853], [0.37497756421265882, -0.28204231826028153, -0.10721968987507459, -0.34577646543332957]]], [[[0.19926670899452006, 0.56279474489523684, -0.61940871785611107, -0.20079863936280262], [0.74539279927668478, 0.13268577809095791, -0.75534489398709803, 0.040217871819996656], [-0.078281664353810038, -0.19583054236924541, -0.45513412167388184, 0.12570630379951078]], [[-0.49896423166857456, -0.44399818743603975, 0.62487765184149069, -0.10155016640873719], [0.07611851629823814, -0.0078599636954381283, 0.056390698297244246, 0.61428435349857013], [0.053680531731105444, 0.17606384418074045, 0.38667570299407383, 0.75442118180691087]]]])
61034          self.failUnless(isinstance(res,Data),"wrong type of result.")
61035          self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
61036          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61037       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61038       def test_generalTensorProduct_array_rank0_float_rank0_offset0(self):
61039          arg0=numarray.array(0.429129135575)
61040          arg1=-0.799328581784
61041          res=generalTensorProduct(arg0,arg1,offset=0)
61042          ref=numarray.array(-0.34301518334135217)
61043          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61044          self.failUnlessEqual(res.shape,(),"wrong shape of result.")
61045          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61046       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61047       def test_generalTensorProduct_array_rank0_array_rank0_offset0(self):
61048          arg0=numarray.array(0.546867720148)
61049          arg1=numarray.array(-0.945901917593)
61050          res=generalTensorProduct(arg0,arg1,offset=0)
61051          ref=numarray.array(-0.51728322515706049)
61052          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61053          self.failUnlessEqual(res.shape,(),"wrong shape of result.")
61054          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61055       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61056       def test_generalTensorProduct_array_rank1_array_rank1_offset1(self):
61057          arg0=numarray.array([0.84720838597731163, 0.96761384931609951, -0.34350404065584983])
61058          arg1=numarray.array([0.14254722554740384, 0.38587156635226205, -0.9756326729326732])
61059          res=generalTensorProduct(arg0,arg1,offset=1)
61060          ref=numarray.array(0.82927564188954528)
61061          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61062          self.failUnlessEqual(res.shape,(),"wrong shape of result.")
61063          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61064       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61065       def test_generalTensorProduct_array_rank2_array_rank2_offset2(self):
61066          arg0=numarray.array([[-0.75781563843283184, -0.75850235491912232, -0.81113786053232517], [-0.03044399430833189, -0.84899525253564301, 0.6258693367354744]])
61067          arg1=numarray.array([[-0.10841119021549361, 0.48014833287233638, -0.84646955254583744], [0.52283861134408616, 0.42335269030510125, 0.2326408917305347]])
61068          res=generalTensorProduct(arg0,arg1,offset=2)
61069          ref=numarray.array(0.17482663666982518)
61070          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61071          self.failUnlessEqual(res.shape,(),"wrong shape of result.")
61072          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61073       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61074       def test_generalTensorProduct_array_rank3_array_rank3_offset3(self):
61075          arg0=numarray.array([[[-0.8153269130841081, 0.17933782883732352, -0.43004524333572203], [-0.79659523841190438, -0.54615778391768433, 0.73882102683333684], [-0.062560136120825005, 0.28621797203970023, 0.60181889130122102], [-0.23925977312195656, 0.75413230705168921, 0.6894549260050078]], [[0.86389223650701474, 0.34983088476049984, -0.99072388411935641], [0.97773824089764849, -0.40341579722993282, 0.60824758458576778], [0.13314845911006024, 0.73735869125571529, 0.63607675958349441], [0.64514334408370333, -0.55788020254365867, -0.57393752641692264]]])
61076          arg1=numarray.array([[[0.82509682932791151, 0.34085004075489223, 0.86786217768207141], [-0.074344546420591406, -0.94106264423041486, 0.58087776473158814], [-0.66677170138006336, -0.18820701915956106, -0.46260048175481994], [0.64697907742849048, -0.91375703656948848, -0.54702303697544985]], [[-0.28006947957606276, 0.94695171957122404, -0.41268476423978551], [0.1132248264062643, 0.39040983533108164, -0.5070652190578413], [0.60254179777716166, 0.48166498600982544, -0.6592222787118307], [-0.7615692606536244, -0.14705739460559064, -0.78227235493562408]]])
61077          res=generalTensorProduct(arg0,arg1,offset=3)
61078          ref=numarray.array(-1.2953232993207786)
61079          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61080          self.failUnlessEqual(res.shape,(),"wrong shape of result.")
61081          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61082       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61083       def test_generalTensorProduct_array_rank4_array_rank4_offset4(self):
61084          arg0=numarray.array([[[[0.36248549255875262, 0.091838491211693851], [0.7037325270990471, -0.93290932113097402], [0.069265207604657597, 0.84511754541809503]], [[0.19662389575931849, 0.63983092676360642], [-0.53521386731656051, -0.8252813406871593], [0.26226333062458851, 0.46334621698540213]]], [[[-0.30254044787592349, 0.36624814583088572], [-0.17752570771436771, -0.7843303400869146], [-0.72899755849546843, 0.71829546687988821]], [[0.6782946796420346, 0.43148769710793666], [-0.81311833569324543, 0.66649633139730069], [-0.065423058658944599, 0.52043325921384476]]], [[[-0.067084014526594737, 0.85324579597733252], [-0.082612945659737758, -0.64257113348664774], [-0.41051998237559717, -0.38596828641208636]], [[0.090950584098632214, -0.23992873381286217], [-0.52854542430173423, -0.68019908988771016], [0.79703194646529574, 0.84319707625193985]]], [[[-0.25170474336308812, -0.83151570202341762], [0.9207903138368343, 0.52327187743451753], [0.23917637941896719, 0.38391817730861333]], [[-0.57503520340721059, -0.51879943369773929], [0.9870163716709055, -0.1941471308329128], [-0.20307712083518181, 0.41578476595661429]]]])
61085          arg1=numarray.array([[[[0.46468570499331086, -0.62470326452016001], [-0.71751051702010571, 0.61937894335259158], [0.8318048107526439, 0.82369383918361017]], [[-0.28511598434234608, 0.34627941816668772], [-0.66600426356686615, 0.41718600873523037], [0.046768800500033514, -0.17335288109212499]]], [[[0.32233606745140531, 0.43868100492599882], [-0.26115011727326709, -0.96866241078491333], [0.9631940136888999, 0.82348226383267886]], [[-0.349958535801556, -0.54169319708263508], [0.47122891718492199, 0.058655956565393685], [-0.37452501463104682, -0.41919398399202534]]], [[[0.16301940524472114, 0.51922895031291905], [0.1796779907351258, -0.45595423564575688], [0.91962363419968907, 0.96543204461471377]], [[0.09251380274804788, 0.23758617600674947], [0.58387993999262733, -0.10837464916271955], [-0.12932247692954668, -0.51497343906113824]]], [[[-0.1518232443562908, 0.90329953208243507], [-0.2605365503636714, 0.29824149005377532], [0.6769406475314439, 0.36945730938732391]], [[0.72412792885087618, 0.18038060746789197], [-0.32591365871103073, 0.081261268277464049], [0.6193115963045166, 0.4999657987136692]]]])
61086          res=generalTensorProduct(arg0,arg1,offset=4)
61087          ref=numarray.array(-2.4776044528835741)
61088          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61089          self.failUnlessEqual(res.shape,(),"wrong shape of result.")
61090          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61091       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61092       def test_generalTensorProduct_array_rank0_array_rank1_offset0(self):
61093          arg0=numarray.array(0.430018952533)
61094          arg1=numarray.array([0.17405266481347681, 0.12684725858108425])
61095          res=generalTensorProduct(arg0,arg1,offset=0)
61096          ref=numarray.array([0.074845944608683102, 0.054546725266730989])
61097          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61098          self.failUnlessEqual(res.shape,(2,),"wrong shape of result.")
61099          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61100       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61101       def test_generalTensorProduct_array_rank1_array_rank2_offset1(self):
61102          arg0=numarray.array([-0.2596702139875493, -0.2895735074501018, -0.88211626259666986])
61103          arg1=numarray.array([[-0.95159197241138482, -0.45620300561671234], [0.17942838282450158, 0.46668790449160968], [-0.56794717501757241, 0.81081773034821758]])
61104          res=generalTensorProduct(arg0,arg1,offset=1)
61105          ref=numarray.array([0.69613782433314564, -0.7319136272398028])
61106          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61107          self.failUnlessEqual(res.shape,(2,),"wrong shape of result.")
61108          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61109       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61110       def test_generalTensorProduct_array_rank2_array_rank3_offset2(self):
61111          arg0=numarray.array([[-0.97489218317706583, -0.045252664981564106, -0.89113304764498258], [-0.3501913135304584, -0.55826461424592799, -0.8654061515474869]])
61112          arg1=numarray.array([[[0.2212209414743862, -0.054349150407258406], [-0.2714427214637134, -0.7744767637879284], [0.021192602734496413, 0.52949723477208965]], [[-0.016772505939617766, -0.86275907314487599], [-0.88314137189927888, -0.11775415644726928], [0.46675795463063086, -0.35554943541255901]]])
61113          res=generalTensorProduct(arg0,arg1,offset=2)
61114          ref=numarray.array([-0.12730353075159806, 0.29174259527508767])
61115          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61116          self.failUnlessEqual(res.shape,(2,),"wrong shape of result.")
61117          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61118       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61119       def test_generalTensorProduct_array_rank3_array_rank4_offset3(self):
61120          arg0=numarray.array([[[0.50878561502983222, -0.14479198118117953, 0.36673894379996397], [0.34487989411006525, -0.52851371261539493, 0.55304935318837289], [0.59081646267938503, -0.80626315077884403, 0.020388460504169093], [0.45589740066146556, -0.60784017956404757, 0.11066067969213056]], [[0.25411533156671218, 0.61497379354121429, 0.66407113202176649], [-0.17271277418374931, -0.088165136251946219, 0.96981177074973979], [0.84958965929853103, 0.87243005824919195, 0.56545158124645556], [-0.47408488299609086, 0.13974289822365438, -0.35740794171351919]]])
61121          arg1=numarray.array([[[[0.11551790541956874, -0.15413632243003517], [0.25625731218580516, 0.927856687758978], [0.37594143013173831, 0.096294046812871237]], [[-0.1848865607798087, 0.43615288915744865], [-0.812304374439905, -0.99117632000028477], [0.907063259654181, -0.087549928919734787]], [[0.76742345834864034, 0.8563058102374741], [0.089128802167366183, 0.74698696172226686], [0.4615317283307987, 0.15958079697544769]], [[0.9357672352900428, -0.71813075885429223], [0.61171418377630227, -0.41339745776309056], [0.2597444842508625, -0.72639669475449908]]], [[[0.1013387379838655, 0.22473934630570636], [-0.14823547162087158, -0.50588269052448287], [0.55392022443062272, -0.18689656551671097]], [[-0.15185627741409657, 0.10714820021851423], [-0.056191863739971204, 0.34237024415476913], [-0.10863630473038999, -0.99980719636997906]], [[0.82776942923713159, -0.99778393075254601], [-0.54089965762023295, -0.48381357764476496], [0.17563110482978428, -0.52781836872553356]], [[0.3324304601921122, 0.32728086982667914], [0.789467675087689, -0.42774499808857303], [-0.91733053032511402, 0.30800389436676268]]]])
61122          res=generalTensorProduct(arg0,arg1,offset=3)
61123          ref=numarray.array([2.340750975303576, -3.0908910578666107])
61124          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61125          self.failUnlessEqual(res.shape,(2,),"wrong shape of result.")
61126          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61127       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61128       def test_generalTensorProduct_array_rank0_array_rank2_offset0(self):
61129          arg0=numarray.array(0.563644591)
61130          arg1=numarray.array([[0.24500474080387091, -0.16226262506701583, -0.51786911047006479, -0.74021941654589174, -0.76057283926604691], [0.0044066131645983386, 0.9295484546164996, 0.24351213924959803, -0.23620282130383896, -0.92179962140932048], [0.48070433412714064, 0.96944856929747059, -0.66799958468547249, 0.91640592254796149, -0.036391524613143211], [-0.21129212235996686, -0.53722133447432108, 0.60673583943966247, 0.48039040450883896, -0.46093067578426417]])
61131          res=generalTensorProduct(arg0,arg1,offset=0)
61132          ref=numarray.array([[0.13809559692354159, -0.091458450940539296, -0.29189412296260842, -0.41722067028951781, -0.42869276691407671], [0.0024837636748567347, 0.52393495851731298, 0.13725430013095699, -0.13313444260692819, -0.51956737059352265], [0.2709463978011819, 0.54642444233753551, -0.37651435269843869, 0.51652724140483297, -0.020511886006453831], [-0.11909366188917685, -0.30280189934643437, 0.34198337406621521, 0.27076945306987138, -0.25980108223193088]])
61133          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61134          self.failUnlessEqual(res.shape,(4, 5),"wrong shape of result.")
61135          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61136       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61137       def test_generalTensorProduct_array_rank1_array_rank3_offset1(self):
61138          arg0=numarray.array([-0.055353661857031167, -0.58911500691978236, 0.23067676644596946])
61139          arg1=numarray.array([[[-0.89547806204576075, -0.4030293427981857, 0.43945118560188035, -0.2407765205686041, -0.7101213828926265], [-0.92741361662773203, -0.48272025345512382, 0.1639226094990256, 0.7053354652879591, 0.33162548844980599], [-0.19077567305995879, -0.69667359146432539, -0.99293341267288548, 0.51713992356824967, -0.5869751307126696], [-0.50223473208053182, -0.5044191409852683, 0.087329520581260311, -0.92793743087045044, 0.93873910856543641]], [[0.10177648203570122, 0.82862807638003422, 0.98554789045537516, -0.9583551777910877, 0.025683658444351165], [-0.017396067806169313, 0.92214054364746767, 0.62702164606076516, 0.23747634052356892, 0.36278252490414165], [0.74660461948563595, 0.74012638853691692, -0.81960422874870487, -0.30238856772085065, 0.48159866903979798], [-0.55527429450489985, 0.99102565989449287, -0.60107446343982751, -0.23025264311510862, -0.60710517046895118]], [[-0.89222526508707611, 0.25954042635560803, -0.86816945818315516, -0.59801247196502905, -0.63342224404360792], [-0.59187664394248785, -0.10742425820274915, 0.24022981085805384, 0.63002278029827452, -0.14248109796902209], [0.54019491748629744, 0.45137450270730706, 0.10176541504494185, -0.57521007247825784, 0.12259261444948], [0.086167133203624457, 0.86833395220043896, -0.83157977981206677, -0.60852604630694662, 0.11018823423717539]]])
61140          res=generalTensorProduct(arg0,arg1,offset=1)
61141          ref=numarray.array([[-0.21620570216354729, -0.40597813867711757, -0.80519280797671267, 0.43996169597141899, -0.12193860476701268], [-0.074948166017119247, -0.54130677959066154, -0.32304614208220955, -0.03361215908564294, -0.26494439377926826], [-0.30466543666122703, -0.29333451735712057, 0.56127856814101817, 0.016828455156927935, -0.22294651244861929], [0.37479770704340498, -0.35560217363326707, 0.15744184328736791, 0.0466372015547038, 0.33110998508857248]])
61142          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61143          self.failUnlessEqual(res.shape,(4, 5),"wrong shape of result.")
61144          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61145       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61146       def test_generalTensorProduct_array_rank2_array_rank4_offset2(self):
61147          arg0=numarray.array([[0.44725799816010214, -0.30781810713277391, -0.42095006385057743], [0.23951656502926255, -0.70741474776970859, 0.82912121602278477]])
61148          arg1=numarray.array([[[[-0.45899871970899264, 0.90138237319513981, -0.88486761864911045, 0.91326764012723216, 0.6330995367560559], [-0.98584312311868993, -0.88769403279970627, 0.88503141460828383, -0.078475848210554755, -0.55207750765863217], [0.85710266168441884, -0.68787977782117626, -0.43109610187579839, -0.29472766265280481, -0.69964136094610918], [0.084963159911480846, 0.78201696882933147, 0.21017306762010968, 0.0029497891099103946, 0.78500120370195914]], [[-0.81658605980180421, 0.15752417192889157, 0.24931502361618008, -0.93542356047097819, -0.50180732714728937], [0.74464188574171075, -0.11442604205622997, 0.64010084942366174, -0.69364846236481048, 0.26510763839198437], [0.79928632529201615, 0.36193749110686002, -0.9058319210578345, -0.50328246480883809, -0.78306328087440868], [0.39903589296138131, 0.78519164256929375, -0.35522033660816765, 0.86724063632987725, -0.66653006236768508]], [[0.25585306743771996, -0.64337901935686181, -0.052803226849122087, 0.498546335129749, 0.79227950816184278], [-0.47713335663907452, 0.78417760075495258, 0.42013084877264628, -0.78791206665497637, 0.59906704860464743], [0.89689992123555196, 0.7286365786968787, -0.83325476268992937, 0.91527342231374575, 0.60628167536899524], [0.63533250205997005, 0.063424137848401063, 0.22852083010701318, 0.56652665099407118, -0.18357308988204046]]], [[[-0.22759605447156139, 0.80481113860278497, -0.24327265123693542, -0.13919308406348718, -0.12171689045768574], [-0.032402323837273483, 0.80198761021642073, 0.5358359846116636, -0.25911827883089167, 0.013134937082985854], [-0.84648187757795701, 0.043551710340560712, -0.68644287344765242, 0.11555625407117409, -0.14712685177866569], [-0.95458011575892376, -0.0081606835963243807, 0.24576319422438453, -0.47490439749357716, 0.75409670953211183]], [[-0.96547293480754437, 0.014018860754857698, -0.905098400556825, -0.16378556114177001, -0.51098386854290467], [-0.28232848587187442, 0.88836702158793401, -0.24312610243309707, 0.82668454674738445, 0.50950352877292415], [0.51035153018748858, -0.13746930893447296, -0.1782379191628285, 0.88283679016516747, 0.030395603440791508], [0.26005611848397492, 0.44503666833548827, 0.73884405329601099, 0.081272914408241803, 0.47378420261473875]], [[0.49535985942088212, 0.31601482732470054, -0.94651465562676829, 0.67346224422081558, 0.39352133698367764], [0.53863779912361065, -0.15732598653992702, -0.17036979805672403, 0.68863209612718057, -0.82620984731646763], [-0.29741264158990655, -0.47266815407684382, -0.2905006272000874, -0.39039145987783463, -0.86932976507925197], [-0.63751143745363303, 0.14708387794956779, -0.17722675840809776, 0.88241605499470266, -0.32485554712278386]]]])
61149          res=generalTensorProduct(arg0,arg1,offset=2)
61150          ref=numarray.array([[0.9775578981158688, 1.0703551711428427, -0.65304353199915166, 1.1274505615804493, 0.76271530590722469], [0.16926730775768839, -1.2587023877046706, 0.18102401009024222, 0.43417776142217956, -1.6230157132814935], [-1.0506066238715461, -1.0100102822578922, 0.15759239355005075, -1.282720224426189, -1.104614815851122], [-1.2934528198236481, -0.11346101366247871, -0.50359830985940413, 0.056276260063267469, 0.2096552880880454]])
61151          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61152          self.failUnlessEqual(res.shape,(4, 5),"wrong shape of result.")
61153          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61154       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61155       def test_generalTensorProduct_array_rank0_array_rank3_offset0(self):
61156          arg0=numarray.array(0.484459788449)
61157          arg1=numarray.array([[[-0.75859581736483772, -0.66071378873280318], [-0.78537935758374333, -0.46936266139450566]], [[-0.9835100329443871, -0.78474737120841942], [-0.019768759108839351, -0.29063344595908247]], [[0.15080898367774731, -0.89012122626553913], [-0.72128162006096441, -0.78363527564152391]], [[-0.39496668382498301, 0.16948877599172452], [0.6007037490315128, 0.058101560867611424]], [[-0.61627032371103585, 0.10127408641319069], [-0.99337269549800622, 0.79274912503853723]], [[0.38681173819880388, -0.29508915818850312], [0.0017876145256237042, -0.77116990677230168]]])
61158          res=generalTensorProduct(arg0,arg1,offset=0)
61159          ref=numarray.array([[[-0.36750916919911536, -0.32008926231504869], [-0.38048471742749046, -0.22738733564519642]], [[-0.47647106249803073, -0.38017854544179819], [-0.0095771688557740649, -0.1408002177456367]], [[0.073060888328779827, -0.4312279409708607], [-0.34943194106712439, -0.37963977985872455]], [[-0.19134547609038444, 0.082110496561486626], [0.29101681117652572, 0.028147869886498863]], [[-0.29855819065264816, 0.049063222479133459], [-0.48124912591230418, 0.38405507340956069]], [[0.1873947328575099, -0.14295883114969291], [0.00086602735491260799, -0.37360080989339833]]])
61160          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61161          self.failUnlessEqual(res.shape,(6, 2, 2),"wrong shape of result.")
61162          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61163       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61164       def test_generalTensorProduct_array_rank1_array_rank4_offset1(self):
61165          arg0=numarray.array([-0.041265439380634428, -0.54458056973457958, 0.70617486649744965])
61166          arg1=numarray.array([[[[-0.4170322705848184, -0.74155544497018533], [0.61849739185841446, 0.0092847477829254288]], [[-0.41657759742951406, 0.7090979264053161], [0.86382203605428098, 0.33610524375849771]], [[-0.98176093809152198, -0.52574582602174424], [0.28269388763484748, -0.042771475027286288]], [[-0.42339945356073927, -0.23653986422970918], [0.050943526834795083, 0.40928337145601335]], [[-0.1790836685237005, -0.38066539813790179], [-0.24460605803201951, -0.49402831601340735]], [[-0.76429020976031192, 0.90305364048652725], [-0.038626600456146409, 0.54278133275477125]]], [[[0.1658491458321214, -0.80211857071524895], [0.35040521374731615, 0.71226294440115412]], [[0.75377567117819644, -0.43266857566179429], [0.29333777422524987, 0.95491135959627238]], [[-0.99300199547058132, -0.10794098411486774], [-0.52314096741700356, -0.52337325665206369]], [[-0.90316468829125429, 0.39073466422364289], [-0.22759988867688108, -0.47039532691207286]], [[-0.36854310572321891, -0.8854187838778198], [0.52757626416524461, -0.27777773850411469]], [[0.66568793993691133, -0.11465488314176109], [0.31017566150088172, -0.66331138663872169]]], [[[0.09960176563284473, -0.075231296466667708], [0.25230304074464316, 0.77570554577439488]], [[0.78271851360361433, -0.713061202065157], [-0.89185163150359692, 0.84373582655898627]], [[0.69415653208388006, 0.26029843826331822], [-0.017582406242760973, 0.6602623431358261]], [[0.75365039178655757, 0.72386216222676025], [-0.024108328291647885, 0.017580674971473309]], [[0.66029932923188395, 0.71418533200066525], [0.063878472413904541, -0.55997900024276004]], [[-0.96481934361787158, -0.52789893250496922], [-0.68175538292192428, 0.455996112764677]]]])
61167          res=generalTensorProduct(arg0,arg1,offset=1)
61168          ref=numarray.array([[[-0.0027729388969794933, 0.4142923487578144], [-0.038176371456545483, 0.15951606096895421]], [[0.15943481498088519, -0.2971842372297363], [-0.82519525488929935, 0.061929331862617842]], [[1.0714782852907008, 0.26429391003040115], [0.26081066522279361, 0.75304456201861725]], [[1.0415266698041328, 0.30814768114355118], [0.1048195745159147, 0.2516939277768559]], [[0.6743781714227095, 1.0022299221690529], [-0.23210463432874362, -0.22378444111688439]], [[-1.0123131174497126, -0.34761504186060899], [-0.64876021133715467, 0.66084137671836873]]])
61169          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61170          self.failUnlessEqual(res.shape,(6, 2, 2),"wrong shape of result.")
61171          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61172       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61173       def test_generalTensorProduct_array_rank0_array_rank4_offset0(self):
61174          arg0=numarray.array(-0.973401265831)
61175          arg1=numarray.array([[[[0.29457907415024165, 0.59612672000769606, -0.97060769583117157, 0.34621761283149932], [0.14003651050408683, 0.75675005310813948, -0.59491556001480639, -0.063692721275949937], [0.27215179353355268, 0.69169291689012646, 0.19450308319120313, 0.65046646267289598]], [[0.099753186595325172, 0.92051284383895604, 0.40137756555728887, -0.17524568831164333], [0.38146357238411022, -0.061413244035389392, 0.29554225117261557, 0.96623464403978399], [0.72136374896844679, 0.61756218303544586, -0.40419387511891269, 0.41307714541879959]]], [[[0.7830517807063484, 0.86353049401392545, 0.26936582709991086, -0.29994497467351189], [0.15545490072968282, -0.48233268791808492, 0.39862782016647103, 0.37169686347355113], [0.33658081581419452, 0.59511350313196809, 0.59136325019446279, -0.92660144923781207]], [[0.98818897330454503, -0.62652958861622032, 0.87415763036782979, -0.35689869665194074], [0.86461890456231427, -0.5684511336678657, 0.18767643730743999, 0.19866587632229638], [-0.43293767514707837, 0.40870353851520402, -0.19472418988420936, 0.75672439002930947]]], [[[-0.40216349448253053, -0.15298171315937537, 0.17111822737596372, 0.33854776785494756], [0.83777613798703765, 0.30789202676449867, 0.14632897062032701, 0.71038490896197293], [0.042356956471918172, 0.23916418386304406, 0.91086116710781795, 0.87638578464510575]], [[-0.73560531190415168, -0.37363420558312632, -0.67995148535918126, 0.47199115413336212], [-0.27194112419103589, -0.15001767237490915, 0.66188213671241125, 0.94485387402579413], [0.30443864615145677, 0.31743724195591216, -0.98475066295825453, 0.33545579885065679]]]])
61176          res=generalTensorProduct(arg0,arg1,offset=0)
61177          ref=numarray.array([[[[-0.28674364366502592, -0.58027050385088352, 0.94479075974690052, -0.33700866258300011], [-0.13631171658716612, -0.73662145961277137, 0.57909155918068145, 0.061998575514199752], [-0.26491290032360476, -0.67329476086684936, -0.18932954738625482, -0.63316487814609346]], [[-0.09709987810251694, -0.89602836740608571, -0.39070143038943494, 0.17058437483389324], [-0.37131712422692265, 0.059779729482806271, -0.28768120139782355, -0.94053402559762145], [-0.70217638637013091, -0.60113581069575828, 0.39344282968169014, -0.40208981623631462]]], [[[-0.76222359455039723, -0.84056167595640374, -0.26220103707053649, 0.29196681802669783], [-0.15131999714983008, 0.4695032489708979, -0.3880248247453012, -0.36181019741038623], [-0.32762819216780387, -0.57928423726148903, -0.57563373630493675, 0.90195502360847457]], [[-0.96190439749439971, 0.60986469463929982, -0.85090614393544772, 0.34740564309425959], [-0.84162113616194867, 0.5533310530750909, -0.1826844816416231, -0.19338161548945154], [0.42142208101388579, -0.39783254174010962, 0.18954477292111069, -0.73659647913935311]]], [[[0.39146645460011797, 0.14891259323825651, -0.16656669913443672, -0.32954282577410082], [-0.81549235319918145, -0.29970248859168536, -0.14243680522950233, -0.69148956961047858], [-0.041230315046493111, -0.23280271931360877, -0.88663341305860899, -0.85307503212941382]], [[0.71603914175915095, 0.36369600867219348, 0.66186563655196495, -0.45943678689421974], [0.26470783451892721, 0.14602739218668384, -0.64427690970646612, -0.91972195700157255], [-0.29634096353155581, -0.30899381314163193, 0.95855754185100239, -0.32653309923141544]]]])
61178          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61179          self.failUnlessEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
61180          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61181       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61182       def test_generalTensorProduct_array_rank0_Symbol_rank0_offset0(self):
61183          arg0=numarray.array(-0.957462297702)
61184          arg1=Symbol(shape=())
61185          res=generalTensorProduct(arg0,arg1,offset=0)
61186          s1=numarray.array(-0.559707298165)
61187          sub=res.substitute({arg1:s1})
61188          ref=numarray.array(0.53589863574133045)
61189          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61190          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
61191          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61192       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61193       def test_generalTensorProduct_array_rank1_Symbol_rank1_offset1(self):
61194          arg0=numarray.array([-0.36386467030272707, 0.79053000390700823, 0.49949697175291008])
61195          arg1=Symbol(shape=(3,))
61196          res=generalTensorProduct(arg0,arg1,offset=1)
61197          s1=numarray.array([-0.41668251834151615, -0.84458361932879855, -0.81891948201294307])
61198          sub=res.substitute({arg1:s1})
61199          ref=numarray.array(-0.92510044610547126)
61200          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61201          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
61202          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61203       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61204       def test_generalTensorProduct_array_rank2_Symbol_rank2_offset2(self):
61205          arg0=numarray.array([[0.24921109239870542, 0.070069423064783365, 0.18377777086430602], [-0.62079299114141939, 0.69372333437842615, 0.18995102366798089]])
61206          arg1=Symbol(shape=(2, 3))
61207          res=generalTensorProduct(arg0,arg1,offset=2)
61208          s1=numarray.array([[0.21185241787837517, -0.47522346439650831, 0.15044667792382516], [-0.96445248594758759, 0.24322056182988483, 0.43116514893080304]])
61209          sub=res.substitute({arg1:s1})
61210          ref=numarray.array(0.89649947772901273)
61211          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61212          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
61213          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61214       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61215       def test_generalTensorProduct_array_rank3_Symbol_rank3_offset3(self):
61216          arg0=numarray.array([[[0.89951661489407675, 0.57634448615134071, -0.53622729711472106], [-0.43350107796423099, -0.080051592191078047, -0.15553247466126097], [0.72180063867107735, -0.82980647180863376, -0.59717174549223451], [-0.83995910214212777, -0.8011097028059524, 0.48642967841411688]], [[0.032209410767552127, -0.29174761516294923, 0.60698244153542502], [-0.16082619446803559, 0.90130271430612341, 0.61908893637597195], [0.5316196866201981, -0.7645309286542088, 0.86841619625011068], [-0.046878997260848765, -0.21160695253715578, 0.58711713241006014]]])
61217          arg1=Symbol(shape=(2, 4, 3))
61218          res=generalTensorProduct(arg0,arg1,offset=3)
61219          s1=numarray.array([[[0.91690796541437947, 0.93895712717412416, 0.4960289759729275], [0.57518708286608367, -0.3607057205398787, 0.7394114541246426], [-0.31410764644321443, -0.29420028545817356, 0.75700165987390822], [-0.33725518282725941, 0.069572583101098928, 0.6692500078886463]], [[-0.10731293521792296, 0.80789326974389519, -0.51130078623618203], [0.56766444048947928, -0.43024591812978841, 0.63463592438763272], [-0.46509124824695425, 0.87273573225039591, -0.19057357437390876], [-0.42004672769206963, -0.80433128985257563, -0.92474583620338513]]])
61220          sub=res.substitute({arg1:s1})
61221          ref=numarray.array(-1.185796687546163)
61222          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61223          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
61224          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61225       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61226       def test_generalTensorProduct_array_rank4_Symbol_rank4_offset4(self):
61227          arg0=numarray.array([[[[0.5070106039208957, -0.80093573762737025], [0.96275336071758555, 0.075439570813181422], [0.49472379237646691, -0.43458105274270808]], [[0.72718767173515753, 0.80846558074432373], [-0.64809196852926876, -0.43919101455912912], [-0.893415135600508, -0.53830852436619581]]], [[[-0.7144096015445689, 0.46424273455446419], [0.87470571392874574, 0.73127223646986539], [0.44580582735968366, 0.09358399253891192]], [[-0.47531949689131281, 0.80987197534344246], [0.22102468059979441, 0.011807204402863203], [-0.25714838425275377, -0.63922489846208608]]], [[[-0.33241159141299415, 0.77011505826981685], [0.99202765676214599, -0.16610877114467915], [0.92115394272001705, -0.91405724352793505]], [[0.97188471308071089, 0.30319183123524751], [0.37241323053622089, 0.73658498120101434], [0.65837281703545369, 0.29231746666974989]]], [[[0.098894799684311918, -0.070761173565578872], [-0.91516821529268766, 0.44476922635848548], [-0.89095186965196538, -0.94200176632887711]], [[0.72634719623762956, -0.97327084224425731], [-0.96179619381454295, 0.52766972623475761], [-0.9488934329813703, -0.70402900917681022]]]])
61228          arg1=Symbol(shape=(4, 2, 3, 2))
61229          res=generalTensorProduct(arg0,arg1,offset=4)
61230          s1=numarray.array([[[[-0.11820066798291351, -0.51258557543222039], [-0.098364895518923579, -0.75261766421768717], [-0.063909470910654687, -0.73607442780090548]], [[-0.38847542547631408, 0.67314170861984213], [-0.089021817061877506, -0.36081485475815711], [0.85601942110178308, -0.079874643934933598]]], [[[-0.22567418092861158, 0.44842015216882913], [0.47159266399869981, -0.032362209916325435], [-0.23592039935287534, -0.92821348171903462]], [[-0.99825597347382367, -0.014365429430939214], [0.24509461408578925, 0.79747699887960977], [-0.44637938871932281, 0.35195013915421569]]], [[[-0.85809446703075554, 0.020878136895004173], [-0.67634718571481112, -0.60950223946435922], [0.50291952025652686, -0.10535591431772939]], [[0.97430474404201473, 0.18572127273504013], [0.47253795512498886, 0.63623230687133225], [-0.51874893042992887, 0.77155986057556136]]], [[[-0.30687039741377387, 0.32128067060991428], [0.50377807631485538, -0.6559782356049495], [-0.5583444443570067, 0.95056487885272278]], [[-0.56413370947964347, -0.3141119685197773], [-0.26123657655870547, 0.91755715991922915], [-0.5567270925980643, -0.59222723358438967]]]])
61231          sub=res.substitute({arg1:s1})
61232          ref=numarray.array(3.4217241320311644)
61233          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61234          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
61235          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61236       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61237       def test_generalTensorProduct_array_rank0_Symbol_rank1_offset0(self):
61238          arg0=numarray.array(0.108487093181)
61239          arg1=Symbol(shape=(2,))
61240          res=generalTensorProduct(arg0,arg1,offset=0)
61241          s1=numarray.array([0.84138252420927007, -0.92070896817838488])
61242          sub=res.substitute({arg1:s1})
61243          ref=numarray.array([0.091279144304962714, -0.099885039623576935])
61244          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61245          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61246          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61247       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61248       def test_generalTensorProduct_array_rank1_Symbol_rank2_offset1(self):
61249          arg0=numarray.array([-0.88164918266823733, 0.51849070402116149, 0.21407376222612973])
61250          arg1=Symbol(shape=(3, 2))
61251          res=generalTensorProduct(arg0,arg1,offset=1)
61252          s1=numarray.array([[-0.66753189134297752, 0.63604973587224611], [0.24368306203710977, 0.90997330527638165], [-0.98449387680117129, -0.47340125794576626]])
61253          sub=res.substitute({arg1:s1})
61254          ref=numarray.array([0.5041220407057575, -0.19030281840593222])
61255          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61256          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61257          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61258       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61259       def test_generalTensorProduct_array_rank2_Symbol_rank3_offset2(self):
61260          arg0=numarray.array([[-0.48368367521376232, 0.30609630853711667, -0.26702652782848735], [0.41384989253050808, -0.50719047280485663, 0.23578081638741089]])
61261          arg1=Symbol(shape=(2, 3, 2))
61262          res=generalTensorProduct(arg0,arg1,offset=2)
61263          s1=numarray.array([[[0.94427607440082362, 0.73859626063120443], [0.68317458423465416, -0.99520231028946493], [-0.20997916005756068, 0.88242044704976808]], [[0.76525228434960391, 0.78715761878550694], [0.40871097191938799, 0.19907179685124388], [0.68637205898056397, -0.78263837970114158]]])
61264          sub=res.substitute({arg1:s1})
61265          ref=numarray.array([0.079694931224933291, -0.85723771425921702])
61266          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61267          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61268          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61269       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61270       def test_generalTensorProduct_array_rank3_Symbol_rank4_offset3(self):
61271          arg0=numarray.array([[[-0.019572223955578893, -0.9250431623941755, 0.44113863083036331], [0.16475833916322835, 0.18179350359368796, 0.61858296572780058], [-0.2720849224062758, -0.76724652269718852, 0.79207356062815881], [-0.23899953264169271, 0.017892682882899358, -0.37426572707749517]], [[0.41051117825823735, -0.032439543670818693, 0.6211335817861523], [0.77419812491244255, -0.36484297441721059, 0.32162185231108009], [0.89581390224822743, 0.86956478253874758, -0.10849549467724673], [-0.42880379570159, -0.49982493514413084, -0.052879122591514394]]])
61272          arg1=Symbol(shape=(2, 4, 3, 2))
61273          res=generalTensorProduct(arg0,arg1,offset=3)
61274          s1=numarray.array([[[[0.87391667386784877, -0.6471677646729681], [-0.34183333619232692, 0.2618328015568907], [0.268334890441561, -0.28080804553410532]], [[-0.99864903808059657, -0.33782866020730462], [-0.88664715155393736, 0.11667158103125796], [0.59964444832918185, -0.62609715880501171]], [[0.22723251258215482, -0.4424072035615052], [0.77129609805160704, 0.8371606647229084], [-0.93328965088392013, 0.24195753531013242]], [[0.10584444738563992, 0.95898293264234202], [-0.54401506237790409, -0.34627867521321964], [-0.7302680224080853, -0.2290542842136678]]], [[[-0.6898420381456476, -0.16576591511921568], [-0.16678612923474789, 0.43246154039245743], [-0.58526569874414802, -0.36747268410116618]], [[-0.58344182130098132, -0.36469539378659577], [-0.68872653593994215, 0.092812389150101371], [-0.86846350365516822, 0.62743490904714494]], [[-0.25855664260307276, -0.9492244487968462], [-0.92969704766912842, 0.36333565697076509], [-0.073467842205704237, 0.73319138103443526]], [[0.40778032771627637, -0.34401855672469117], [0.2543827332672941, 0.43552413714033089], [0.30669085716473932, -0.069296006825886325]]]])
61275          sub=res.substitute({arg1:s1})
61276          ref=numarray.array([-3.1632114345394542, -2.3602881471017327])
61277          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61278          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61279          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61280       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61281       def test_generalTensorProduct_array_rank0_Symbol_rank2_offset0(self):
61282          arg0=numarray.array(0.455040090646)
61283          arg1=Symbol(shape=(4, 5))
61284          res=generalTensorProduct(arg0,arg1,offset=0)
61285          s1=numarray.array([[0.18689217676364223, 0.43741941176715082, 0.14945398547643274, -0.26067257495533847, -0.60874095714372567], [0.55554155897958468, -0.55346823947274082, 0.31980465520665247, 0.70796260301073999, 0.24071914382063953], [-0.44601774141459916, 0.13052963266249162, -0.43045278573316748, 0.31729655731190576, -0.77333782351433955], [-0.72070257520136849, -0.77044763579497211, -0.04139231794665621, -0.091555910165080245, 0.47241932906674289]])
61286          sub=res.substitute({arg1:s1})
61287          ref=numarray.array([[0.085043433055538617, 0.19904336878080359, 0.06800755509858801, -0.11861647213657918, -0.27700154031855706], [0.25279368135563862, -0.25185023785930649, 0.14552393929421814, 0.3221513670479193, 0.10953686102434891], [-0.20295595348298187, 0.059396215878717115, -0.19587327463880366, 0.14438265420084379, -0.35189971331187342], [-0.32794856514836923, -0.35058456203006877, -0.018835164110490639, -0.041661609660686626, 0.2149697343214092]])
61288          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61289          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
61290          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61291       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61292       def test_generalTensorProduct_array_rank1_Symbol_rank3_offset1(self):
61293          arg0=numarray.array([0.69261168472180512, 0.25365734042241272, 0.84943826521908639])
61294          arg1=Symbol(shape=(3, 4, 5))
61295          res=generalTensorProduct(arg0,arg1,offset=1)
61296          s1=numarray.array([[[0.68885706909213917, -0.65202153072428182, 0.6261285538208996, 0.34721912808941968, -0.089315251083961655], [0.80381675905121908, -0.57216740190522941, 0.82470959561442947, 0.27246398430511132, -0.9972757144407598], [-0.22169304397082157, 0.37234701973945517, -0.66935271898725701, 0.93278354992490553, -0.52458317948156341], [0.50398300848981581, -0.77543421503402299, -0.18608364241577902, -0.26294305822629416, -0.54765425234742993]], [[0.7093795777051215, 0.2705953748419847, 0.49310825191934216, 0.43517647000100101, 0.10419151917614733], [0.27389239246670538, -0.2303115997373768, -0.329250102164383, 0.89127380373365095, -0.91200365016766849], [0.23890238241051676, -0.98515286709664185, -0.29358318884600765, 0.71671700644000724, 0.57486481575414028], [0.83986326924122401, 0.59444101381262837, 0.85187919309651039, 0.21375159163354041, 0.98681298894840097]], [[0.92019060411747078, 0.21872878646329008, 0.36924088100677022, -0.66670264741451568, 0.63721942293971989], [0.4618475495949228, 0.72805243234044648, -0.46132130777896729, -0.42828611469801903, -0.11860992183089802], [-0.13459197354298946, 0.29963478116170505, -0.23995949401169159, 0.07645975667540994, -0.85338422976148531], [-0.42775379707854544, 0.85155800233404433, -0.015298622995842281, -0.13410285391723598, 0.60928767765959324]]])
61297          sub=res.substitute({arg1:s1})
61298          ref=numarray.array([[1.4386949026195341, -0.19716262682995825, 0.87239181364688412, -0.21544900896824143, 0.50584671831000161], [1.0185186768527195, 0.16372553908151177, 0.095822825787557353, 0.050987267552316029, -1.0228130393058292], [-0.20727542225167622, 0.26252188917493779, -0.74190182156243534, 0.89280515875279409, -0.94241097914475347], [0.19875156044422004, 0.33705548077213021, 0.074206469631460034, -0.24180986989158129, 0.38855289183805991]])
61299          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61300          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
61301          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61302       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61303       def test_generalTensorProduct_array_rank2_Symbol_rank4_offset2(self):
61304          arg0=numarray.array([[0.3039031119878608, -0.46902944817620895, -0.44578563165877094], [-0.80408081597354619, 0.25386737228506684, 0.67140851967585236]])
61305          arg1=Symbol(shape=(2, 3, 4, 5))
61306          res=generalTensorProduct(arg0,arg1,offset=2)
61307          s1=numarray.array([[[[-0.7263198493755374, 0.41904505539463011, 0.62028771669774407, 0.3399262059509971, 0.77016983399369865], [0.61404312962626517, 0.89616485410854163, -0.68019137772344873, 0.16692385359091166, 0.8493678342931037], [-0.44709754369522159, -0.97629085323232334, 0.89129750684206099, 0.90458110464850172, 0.88105135078018559], [0.7773611433790939, 0.46510160723654459, 0.17770531005480272, -0.64727757502491245, 0.65450344044478048]], [[-0.55275453692537346, 0.04580544549354526, 0.88315714627967568, -0.19976922382794315, -0.93320819590088133], [-0.59604629038500878, 0.26722391030409054, -0.51704885626719332, 0.89797871613171276, -0.82316582800822435], [-0.42709666311894368, -0.19737072428338598, -0.53187264500240472, 0.3941846918094376, -0.23130808509598322], [-0.4703798656484568, -0.80834752615263628, 0.79231878041242454, 0.31063362607484923, 0.81711403637294655]], [[0.52648144284381293, 0.72207380343518701, -0.78353420303272348, -0.076693518541859795, -0.47001685584179387], [-0.76843681971154343, -0.9895347885157586, 0.88163402522052969, -0.12693131163753169, 0.33380827597641671], [-0.3222421039510619, 0.75106816768685447, 0.84282915735514985, 0.59382684882384917, -0.19922655262290134], [-0.52714059312842299, -0.98166350594347263, -0.30681161042064753, 0.73300771282988264, 0.95340535851031061]]], [[[-0.052278161619904395, 0.63409984871791414, -0.51065188116020144, 0.66473745611932111, 0.43562785427842066], [-0.12208923066493016, 0.3732032006981516, 0.10885065610075229, 0.40488446751220653, -0.14025724107980087], [0.91619382187166654, -0.38057512677947702, -0.85375638984117419, -0.44377333923125728, 0.65135742691899678], [-0.086367612992696907, 0.74519488858450966, -0.68393350024952237, -0.45417846856628397, -0.95934406298597197]], [[0.51957119310746447, -0.32270541491288429, 0.81484723489763278, 0.096250871173069852, -0.95029164011783007], [-0.38276064312286895, -0.55473818935587738, -0.91309027789119468, -0.87640582593842975, 0.62339088180769453], [-0.9466807402305879, -0.87893287805822551, 0.3081486631688175, 0.80360638114146465, 0.12486797541643435], [0.8909434794049067, -0.46117744168311603, 0.50373971600741707, -0.35581016383564457, -0.53680159160692842]], [[-0.31832036380648088, 0.45836580426357942, 0.90480600953309942, -0.22878050845203379, -0.98953245101753917], [0.32769362994007945, 0.75323594687200446, -0.98573717113446935, -0.96261733160912311, 0.6601996860915138], [0.54893410536584719, -0.37750642947621627, 0.43557336829842952, -0.23466449436952375, 0.24491067970190938], [0.35792431433305527, -0.14927724289874322, 0.49926138099833861, 0.90623067822960146, -0.0040842419516855522]]]])
61308          sub=res.substitute({arg1:s1})
61309          ref=numarray.array([[-0.23595553353137594, -0.50006632635561277, 1.3485319191584209, -0.43248171363355531, -0.37462266478061279], [1.0297464382360819, 0.65294536705185269, -1.3383818062720076, -1.5082257829228833, 1.2097080648270018], [-0.40036871552609365, -0.70952079882714991, 1.2017765873272452, 0.22858463563347567, 0.13744789582420677], [1.2277976364526209, 0.14159527400356242, 0.83218579365567358, 0.21414830656459077, 0.023012229433182374]])
61310          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61311          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
61312          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61313       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61314       def test_generalTensorProduct_array_rank0_Symbol_rank3_offset0(self):
61315          arg0=numarray.array(0.890045711116)
61316          arg1=Symbol(shape=(6, 2, 2))
61317          res=generalTensorProduct(arg0,arg1,offset=0)
61318          s1=numarray.array([[[0.49254859843576848, -0.87591437650742887], [0.65951944732768886, 0.62391289331539457]], [[0.56006360504326724, 0.25580615479271751], [0.81538317307965458, -0.42091246260962034]], [[-0.041061181788684786, -0.41035548527018695], [0.71939662130420423, 0.37291912317303932]], [[0.86828122599620094, 0.76141592812588854], [-0.38080320814229718, 0.63409187587724269]], [[0.42738473899131413, -0.32958638811270657], [0.76318734863948845, -0.83807304191658871]], [[-0.79738808556006968, -0.81656788454722151], [0.60156187537550854, -0.98408669269014215]]])
61319          sub=res.substitute({arg1:s1})
61320          ref=numarray.array([[[0.4383907675541347, -0.77960383411560596], [0.58700245549184782, 0.555310994805572]], [[0.49848220962113232, 0.22767917095042836], [0.72572829611600298, -0.37463133210112182]], [[-0.03654632874438847, -0.36523513969780647], [0.64029587738341409, 0.3319150661734408]], [[0.77280998124078182, 0.67769498120413696], [-0.33893226218640576, 0.56437075457827324]], [[0.38039195393580816, -0.29334695118204968], [0.67927162643485017, -0.74592331656010913]], [[-0.70971184564803269, -0.72678274347662131], [0.53541756714909139, -0.87588214019555377]]])
61321          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61322          self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
61323          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61324       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61325       def test_generalTensorProduct_array_rank1_Symbol_rank4_offset1(self):
61326          arg0=numarray.array([0.67072802523959729, 0.59461710689684333, -0.16300700133972379])
61327          arg1=Symbol(shape=(3, 6, 2, 2))
61328          res=generalTensorProduct(arg0,arg1,offset=1)
61329          s1=numarray.array([[[[0.49821714413461771, 0.80260117129412767], [-0.2685890917723317, -0.71656715065610177]], [[0.67394122903184828, -0.14517418062465337], [-0.81135731591198779, -0.38467070393599778]], [[-0.13181904535409261, -0.14043244159422108], [0.65318246231755639, 0.85055397524611576]], [[0.25868965591758908, 0.51066328218361678], [0.84809238904361317, 0.76705402769879205]], [[-0.12740704486405785, -0.70236977382568555], [-0.168964587730285, -0.98844892460350597]], [[-0.49806733863097352, 0.78279804813564513], [0.41669567229466309, -0.30208857559768898]]], [[[-0.71869152579169149, -0.87885492135497922], [0.33985067924909851, -0.20039734809753118]], [[0.52573356595897236, -0.38845082770242856], [0.084116831936275283, 0.73565996928047461]], [[-0.13412399355825033, 0.10177238322584614], [0.98289441645331066, 0.5382233798734064]], [[-0.57089446816259537, -0.53034613162130273], [-0.52586582175554319, -0.52164496435518548]], [[-0.47574911626276029, -0.75126572539751479], [-0.14923656277625552, 0.32918282612656014]], [[-0.8546900413028411, -0.20575588644458942], [-0.35993460099361729, 0.14811324060177355]]], [[[0.99919179315869955, -0.91703684167820243], [0.38520927955450524, 0.77081562040274343]], [[0.24281899809330842, -0.10449645566089116], [0.9525423503592465, 0.35634470582752775]], [[-0.70607945128034144, -0.65904715761561561], [-0.081889162310331498, 0.95174225620630648]], [[-0.98301995159609001, -0.63795520002123141], [-0.7611225240219055, -0.81512912067127719]], [[-0.39858370564805412, -0.44448601105154517], [-0.4704990616544924, -0.64947765146816039]], [[0.14267517123892426, -0.27951838491077852], [-0.4038009311306261, -0.71137402893167945]]]])
61330          sub=res.substitute({arg1:s1})
61331          ref=numarray.array([[[-0.25605333255767082, 0.16522835363896238], [-0.040861013001742261, -0.72542970413435581]], [[0.72506024491765741, -0.31131824493834132], [-0.64945385519922505, 0.12133989903462757]], [[-0.053071254933571066, 0.073752926750072278], [1.0359021241583499, 0.73538656594858898]], [[-0.0057140803719399891, 0.13115445652734165], [0.38021882006867547, 0.33717736738361359]], [[-0.30337210408361037, -0.84536021173374554], [-0.12537325629155027, -0.36137325113502028]], [[-0.86553809395862225, 0.44826207280638397], [0.13128857321098306, 0.0014103401487729206]]])
61332          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61333          self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
61334          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61335       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61336       def test_generalTensorProduct_array_rank0_Symbol_rank4_offset0(self):
61337          arg0=numarray.array(-0.400251875744)
61338          arg1=Symbol(shape=(3, 2, 3, 4))
61339          res=generalTensorProduct(arg0,arg1,offset=0)
61340          s1=numarray.array([[[[-0.22197379460122835, -0.10398529612468255, 0.059085870828096798, -0.017020343031995955], [0.14794601501598792, -0.37637653830071294, -0.080078380627205181, 0.75906007920591634], [-0.84380727698036684, -0.18871835732459563, 0.55510187324873805, 0.45065510434797451]], [[0.38813306746694654, -0.92749223673246739, -0.69012284027771775, 0.91009148738457446], [0.34231741346424971, 0.71945900893965464, 0.63636166211955958, -0.26713803142744941], [-0.47881479842994445, 0.46198399733436202, 0.52143954006095505, -0.087831548652862912]]], [[[-0.049482141878419705, 0.020405158789798872, -0.83890927247519254, 0.49583829636983268], [-0.25613180995076035, -0.79931270295807133, -0.43883411017454255, 0.73382185566986968], [-0.67910496127373299, -0.82638174316309976, -0.46368660790294269, -0.059914211794997341]], [[0.75389399630623366, 0.27288699324460652, -0.90093152494903528, 0.34740945300647708], [-0.030591423029421971, 0.015320153615452359, 0.79899710335876839, 0.054552176701410771], [-0.031661857391701576, -0.7171520089613348, -0.18398512942605239, 0.21148092032953492]]], [[[0.13482430473744555, -0.72854703723588199, -0.69388277527948605, -0.66260185041589281], [-0.83733354172273988, -0.59474295465065108, -0.90619106544835804, -0.71436982067592547], [-0.27260558132720769, -0.50066883889989855, -0.46238560157498787, 0.56476116340530247]], [[0.43038927632611834, 0.025885145824974698, 0.60281390710033378, -0.17385516645046395], [0.16214980639303644, 0.97610905254347702, 0.57091119642593968, -0.400630520972733], [0.34644307872452762, 0.98092242059827872, 0.24847789255006858, -0.72936194577577429]]]])
61341          sub=res.substitute({arg1:s1})
61342          ref=numarray.array([[[[0.088845427655083728, 0.041620309823666088, -0.023649230628894458, 0.0068124242243572343], [-0.059215670018951637, 0.15064541544077292, 0.032051522052555147, -0.30381522050431342], [0.33773544537755779, 0.075534876506435228, -0.22218056599663724, -0.1803755508287401]], [[-0.1553509882917932, 0.3712305074898703, 0.2762229613147118, -0.36426582492403053], [-0.13701318683879041, -0.28796481784878497, -0.2547049489147189, 0.10692249816131044], [0.19164652120541675, -0.1849099614966411, -0.20870715399631842, 0.035154742097780564]]], [[[0.019805320102652329, -0.0081672030804646138, 0.33577500988696074, -0.19846020818757565], [0.10251723737041529, 0.319926408664718, 0.17564417573766886, -0.29371357419357247], [0.27181303457665001, 0.3307608427813617, 0.18559143457037655, 0.023980775654651731]], [[-0.30174748613346808, -0.10922353091220637, 0.36059953277746432, -0.13905128521692789], [0.012244274449194518, -0.0061319202212661095, -0.31980008933311305, -0.021834611050640274], [0.012672717810557418, 0.28704143678012184, 0.073640393161720982, -0.084645635045895853]]], [[[-0.053963680866999944, 0.29160231822116156, 0.27772788235184387, 0.26520763350019361], [0.33514432069762456, 0.23804698318426079, 0.36270467372786813, 0.28592786070021464], [0.10911089526441087, 0.20039364189609415, 0.18507070434725822, -0.22604671500015461]], [[-0.17226411514949336, -0.010360578170344779, -0.24127739704128434, 0.069585856479527697], [-0.0649007641602872, -0.39068947921091185, -0.22850827725255021, 0.16035311749950365], [-0.13866449209790715, -0.39261603880349089, -0.099453742574001233, 0.29192848689281303]]]])
61343          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61344          self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
61345          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61346       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61347       def test_generalTensorProduct_array_rank0_constData_rank0_offset0(self):
61348          arg0=numarray.array(0.276030930635)
61349          arg1=Data(0.525251086603,self.functionspace)
61350          res=generalTensorProduct(arg0,arg1,offset=0)
61351          ref=Data(0.14498554625225879,self.functionspace)
61352          self.failUnless(isinstance(res,Data),"wrong type of result.")
61353          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
61354          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61355       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61356       def test_generalTensorProduct_array_rank1_constData_rank1_offset1(self):
61357          arg0=numarray.array([0.65548645255509275, 0.37351981102482612, 0.66146316938990646])
61358          arg1=Data(numarray.array([0.35738251475002025, 0.75375267320042005, -0.61347308966363956]),self.functionspace)
61359          res=generalTensorProduct(arg0,arg1,offset=1)
61360          ref=Data(0.11001109862765807,self.functionspace)
61361          self.failUnless(isinstance(res,Data),"wrong type of result.")
61362          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
61363          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61364       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61365       def test_generalTensorProduct_array_rank2_constData_rank2_offset2(self):
61366          arg0=numarray.array([[-0.088883398927412705, 0.36597586224843726, 0.74959282604165689], [-0.718337701269115, 0.33607066789476403, 0.59912096183685004]])
61367          arg1=Data(numarray.array([[0.87315550347073834, -0.79911382372503281, 0.79698915770889056], [0.15146867556573818, -0.66249741709046073, 0.63805916366214133]]),self.functionspace)
61368          res=generalTensorProduct(arg0,arg1,offset=2)
61369          ref=Data(0.27817496562025817,self.functionspace)
61370          self.failUnless(isinstance(res,Data),"wrong type of result.")
61371          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
61372          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61373       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61374       def test_generalTensorProduct_array_rank3_constData_rank3_offset3(self):
61375          arg0=numarray.array([[[0.20153302766859094, -0.35116008004588184, 0.61696012433723024], [-0.05050693882863988, 0.17570848078988477, 0.013076273091135571], [0.54811545087018798, -0.42637441096587958, -0.91509586562792244], [-0.41703211918250305, -0.87458651401154675, -0.62989316067326073]], [[-0.71145712499219438, 0.51640319295618808, -0.12182181241786361], [0.49157866232808334, -0.58888312538001397, -0.98499655751430581], [-0.26482063804407496, -0.1466661401594116, 0.92787635744693953], [0.95426503021711473, 0.067265994082578828, 0.93571655790151809]]])
61376          arg1=Data(numarray.array([[[0.083191577418960216, -0.13267380908779791, -0.31670651125183591], [0.9166435728700093, 0.24487144548334538, -0.74832471275995438], [0.45797771718162483, -0.31279505052245482, 0.56265825341334263], [0.049587341838397192, 0.54572386172700593, -0.591555012574563]], [[0.44597368905115276, 0.49570325682287963, 0.52033626676325362], [0.68429154349511578, 0.52206119042946031, 0.28696799887961721], [-0.63491171842396965, 0.004967136652360038, -0.27973878578647238], [0.42734667668017412, 0.24291755554837136, -0.029733817555185338]]]),self.functionspace)
61377          res=generalTensorProduct(arg0,arg1,offset=3)
61378          ref=Data(-0.47517867398842628,self.functionspace)
61379          self.failUnless(isinstance(res,Data),"wrong type of result.")
61380          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
61381          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61382       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61383       def test_generalTensorProduct_array_rank4_constData_rank4_offset4(self):
61384          arg0=numarray.array([[[[0.19606611084966263, -0.57209293064277844], [-0.91377015519165106, -0.47965416825477725], [0.51485687228874144, 0.67502333423066507]], [[-0.76214296278296612, 0.42849950905965351], [-0.49718152947669325, 0.54073334578167409], [0.17217128360555489, -0.66245225909123451]]], [[[-0.28535614441819601, 0.85992886810876312], [-0.3213074749318201, -0.42641881450285668], [-0.92216566064416483, -0.34139385499820341]], [[-0.52182995244734465, -0.90889392707604855], [-0.14249809236581235, 0.69591411936717362], [-0.16624564353948501, 0.35208457246133285]]], [[[0.1216281235985992, -0.81813485876810765], [-0.52879636746006531, -0.58187557546012547], [0.17248644658489098, -0.73232107870650198]], [[-0.1812890888821197, -0.76142628835072901], [0.479650948229281, -0.39383250923388169], [-0.33843160474005596, 0.0072349045599295891]]], [[[0.52484917029162292, 0.78567887353182542], [0.73580273137643371, -0.031129059645950585], [0.093085161075552314, 0.95974042816664906]], [[-0.0042247192709699011, -0.50307277029470732], [0.444377708951877, -0.64356695364233896], [-0.13286936695674534, -0.05066623610144938]]]])
61385          arg1=Data(numarray.array([[[[-0.84558794158576056, 0.61527033930440034], [0.3300136532175415, 0.5046018054928294], [0.42254055880201125, -0.71873864169112323]], [[-0.41746039598975671, -0.58155491346085508], [-0.4813844311354738, 0.18592613876929676], [0.53196416475296071, -0.26252843037889284]]], [[[-0.92314660674941784, -0.79235729537482924], [-0.86399177081949974, 0.25356797810273535], [-0.18129818928386343, 0.15861633373894635]], [[-0.44908184547489838, -0.08178109500798203], [-0.10699307061693131, 0.78887274022102449], [-0.23064213944708545, 0.87519484904768596]]], [[[-0.12010238048508115, -0.61521787096104763], [-0.16162015905453231, -0.41322167296921308], [0.96103403207348626, -0.81427566071653334]], [[-0.099513083940893976, 0.16603620159907706], [-0.40862285561102119, 0.34826516787038209], [-0.42677499726753076, -0.58137530337764143]]], [[[0.70399993629948465, 0.34036547607039669], [-0.50794955273895703, 0.41846445655739406], [0.128196254038766, -0.38060413423278394]], [[-0.44402887336181052, -0.025572509319359948], [0.16890980895514462, 0.72622285390064367], [0.72494568508485191, 0.70969468805643099]]]]),self.functionspace)
61386          res=generalTensorProduct(arg0,arg1,offset=4)
61387          ref=Data(1.0916478580238695,self.functionspace)
61388          self.failUnless(isinstance(res,Data),"wrong type of result.")
61389          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
61390          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61391       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61392       def test_generalTensorProduct_array_rank0_constData_rank1_offset0(self):
61393          arg0=numarray.array(-0.259974017677)
61394          arg1=Data(numarray.array([-0.044411300170266399, -0.8714302585888849]),self.functionspace)
61395          res=generalTensorProduct(arg0,arg1,offset=0)
61396          ref=Data(numarray.array([0.011545784135536585, 0.22654922545091835]),self.functionspace)
61397          self.failUnless(isinstance(res,Data),"wrong type of result.")
61398          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61399          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61400       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61401       def test_generalTensorProduct_array_rank1_constData_rank2_offset1(self):
61402          arg0=numarray.array([0.25002746419177746, 0.56003262174718937, -0.38411653061655926])
61403          arg1=Data(numarray.array([[-0.25220197912710396, -0.51956798157298234], [-0.92297279746096805, -0.36259445263568946], [-0.45338691929511876, -0.038077564179096912]]),self.functionspace)
61404          res=generalTensorProduct(arg0,arg1,offset=1)
61405          ref=Data(numarray.array([-0.40579888640212991, -0.31834476500168113]),self.functionspace)
61406          self.failUnless(isinstance(res,Data),"wrong type of result.")
61407          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61408          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61409       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61410       def test_generalTensorProduct_array_rank2_constData_rank3_offset2(self):
61411          arg0=numarray.array([[0.80780440839221423, -0.29207184993427804, 0.47539604196932705], [-0.32342927832232093, 0.36904363909067373, 0.17617657281137911]])
61412          arg1=Data(numarray.array([[[0.74769328224227594, -0.32948341167934925], [0.75317506354554919, 0.78253366336224439], [-0.74366133755081543, 0.35163398761741416]], [[-0.57198519061406028, 0.37619672855306896], [0.82869637346523017, 0.53243348061751039], [-0.83147507703100421, -0.14754680843174905]]]),self.functionspace)
61413          res=generalTensorProduct(arg0,arg1,offset=2)
61414          ref=Data(numarray.array([0.37481049227597868, -0.27872493940663351]),self.functionspace)
61415          self.failUnless(isinstance(res,Data),"wrong type of result.")
61416          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61417          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61418       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61419       def test_generalTensorProduct_array_rank3_constData_rank4_offset3(self):
61420          arg0=numarray.array([[[-0.24110012719903873, -0.18767619263315161, -0.0023263200028647013], [-0.16745303525596622, -0.081208880408232043, 0.76180141657215583], [0.22392874424529996, -0.90664253147371476, 0.95586755866967299], [-0.77004766332563279, -0.72194418968870044, -0.41632757437658507]], [[0.38522645465910199, -0.13216896105274212, -0.55066562058746626], [0.74643262667383459, -0.73519018574612116, -0.1666972069940782], [-0.12167653683237334, 0.63633427501506423, 0.36224201095372277], [0.94315180298726076, -0.52860157184070178, 0.63695906002259473]]])
61421          arg1=Data(numarray.array([[[[-0.10386758710448762, 0.49459681435541136], [-0.57247650577650155, -0.91506181599997216], [0.24131754746756551, 0.32019397726294696]], [[0.14650617363916774, 0.75743908141412408], [-0.52744783814012308, 0.50178758777395371], [-0.7781074949616511, 0.63112146572169614]], [[-0.46518782328154473, -0.20056089250458453], [-0.76360408062036988, -0.64617573279573759], [-0.49403710427308201, 0.69635162430467124]], [[0.68717921862273146, -0.57062955669372273], [-0.44852558485973271, -0.44895330232946962], [-0.16040098753067511, 0.236634091121674]]], [[[-0.91168574887596909, 0.47032605755320178], [-0.88021956487570652, -0.1344789731642575], [0.41736033090124636, -0.29049394722160526]], [[-0.19043893518805333, 0.45666179206782131], [-0.52033102345351812, 0.40490536270689215], [0.36478983733555137, 0.021961012917905309]], [[-0.87459991171516593, 0.22055198755113836], [-0.95421798597476437, 0.64566339556818741], [-0.25283035488290162, 0.45839489280139634]], [[0.75599636361661271, -0.66524871378964723], [-0.58073190678603837, -0.25496267982118814], [-0.41126607738373178, -0.069735987982464609]]]]),self.functionspace)
61422          res=generalTensorProduct(arg0,arg1,offset=3)
61423          ref=Data(numarray.array([-0.58464390506716768, 2.647960905222289]),self.functionspace)
61424          self.failUnless(isinstance(res,Data),"wrong type of result.")
61425          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61426          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61427       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61428       def test_generalTensorProduct_array_rank0_constData_rank2_offset0(self):
61429          arg0=numarray.array(-0.544185299417)
61430          arg1=Data(numarray.array([[-0.98078244900179024, 0.8612932216239495, -0.40578309224856213, 0.47011167948573584, 0.71368417960651587], [0.36095971146134653, -0.082453576134518425, -0.21455791741457064, 0.31298648068387958, 0.98312794572841744], [-0.088915225329776471, -0.97810755656232362, 0.96698295910836785, -0.31739213445418368, -0.90954767450916862], [0.27052720601589275, -0.50384275667463885, 0.72541118412285566, 0.078921147029740846, -0.46753049705881922]]),self.functionspace)
61431          res=generalTensorProduct(arg0,arg1,offset=0)
61432          ref=Data(numarray.array([[0.53372739067249519, -0.46870310969483769, 0.22082119355344024, -0.2558278650601426, -0.38837643896799667], [-0.19642896865888917, 0.044870024016724741, 0.11675926453043051, -0.17032264170427608, -0.53500377551095524], [0.048386358518770684, 0.53227175352941702, -0.52621791113304806, 0.17272013372039449, 0.49496247358636042], [-0.14721692860606994, 0.27418382139982711, -0.39475810243197978, -0.042947728026673772, 0.25442322352830232]]),self.functionspace)
61433          self.failUnless(isinstance(res,Data),"wrong type of result.")
61434          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
61435          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61436       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61437       def test_generalTensorProduct_array_rank1_constData_rank3_offset1(self):
61438          arg0=numarray.array([0.80321090298129461, 0.75733336332953161, -0.43955933605807429])
61439          arg1=Data(numarray.array([[[0.78879034368954803, -0.96360675680855756, -0.84472039581731684, 0.09269639329379209, -0.88687967608738894], [0.79891982880015688, 0.82615559491626334, 0.43870962789013146, -0.25776922865703966, 0.67159680941934141], [0.15766345982285435, 0.94565467500035094, -0.8168137099869337, -0.65770921213262823, -0.45484089804148842], [0.30783009097762659, -0.74026449285791296, 0.50469441556734496, -0.62387506102580259, 0.55606803499423529]], [[-0.69476518669236187, 0.096269932704859063, 0.840466296413374, 0.28100748815042675, 0.89485512724460081], [-0.49494734703497656, 0.32846002879809877, -0.47440701189166701, 0.72065242250436712, -0.16056243259888681], [-0.15293388856941381, -0.18054680962975578, -0.53864585972941614, -0.49240229154519533, -0.66400626488214631], [-0.94437636064801156, -0.69962040250207069, 0.059472100896275526, -0.7258679313156231, 0.67604426321411459]], [[0.064574213796787738, -0.5203881815066389, -0.49359998905171554, -0.25143418573699838, 0.78064423023386498], [0.14841764339904073, -0.83705000950241049, -0.306281157712468, 0.73238623711186346, -0.19822909711796322], [0.6673079453890467, -0.24900668833512962, 0.54201352219333332, 0.96799468027414459, -0.87287769856111841], [-0.47388722998885946, -0.94423009160263582, -0.22079035169225558, -0.7919366924753577, -0.56314753453910193]]]),self.functionspace)
61440          res=generalTensorProduct(arg0,arg1,offset=1)
61441          ref=Data(numarray.array([[0.079011950112823109, -0.47232953777667286, 0.17499101860255675, 0.39779134362721968, -0.37778724179624451], [0.20162261730742118, 1.2802640661490039, 0.12772084079238172, 0.016803859893432249, 0.50496804294514286], [-0.28250636368735516, 0.7322792374388043, -1.3022552621083121, -1.3266829927123065, -0.48452572464437749], [-0.25965368393920485, -0.70938923208333882, 0.54746672385139006, -0.7027240861258599, 1.2061675405110834]]),self.functionspace)
61442          self.failUnless(isinstance(res,Data),"wrong type of result.")
61443          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
61444          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61445       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61446       def test_generalTensorProduct_array_rank2_constData_rank4_offset2(self):
61447          arg0=numarray.array([[-0.11565043696176636, -0.25516973814347077, -0.54480447818461442], [0.68830407667880444, -0.30647666874713475, -0.013222647666291332]])
61448          arg1=Data(numarray.array([[[[-0.33446284196041032, -0.92363008646930722, 0.88230430807039961, 0.051649702155052601, -0.23592181457866568], [0.5104971278349808, 0.43729394737044691, 0.74147148905349103, 0.679887233437517, -0.37964722697630826], [-0.64163119845483507, 0.95243799257993, -0.16694744160255892, 0.39604762563365425, -0.88007651506299212], [-0.0037020293161897921, -0.1880764388967513, -0.94277606167241479, -0.21767848564536085, 0.86977286446058022]], [[-0.73501155027385368, -0.3663203593692046, 0.82214899285811827, 0.27689196615328382, 0.54518051623971897], [0.019286576294491153, -0.25146027753347844, 0.83568832160044115, 0.3106642413049252, 0.47505190873515324], [-0.39292161117350854, -0.43719499734442269, 0.99190052560446107, 0.85336334151266713, 0.63343006213304576], [0.50340344988815167, -0.84122407791744069, 0.86751806824640409, 0.90579274672227883, -0.9621102266168795]], [[0.62326775177626104, 0.12008759026684923, 0.069631861735134581, 0.97900205683156449, -0.89083965983886837], [-0.69668647900055825, -0.74950149073381267, 0.2675896848146746, -0.51872180189847761, -0.94953751629793781], [0.28091433991839621, -0.27113159959604527, -0.011931951002468466, 0.53630770624257829, 0.35087185995834824], [-0.44314547583921393, 0.94373890147914818, -0.73493654942927988, 0.31550405206769172, 0.26665247900793876]]], [[[0.59710385642002928, -0.12803887338848163, -0.26402126307209817, -0.29285538855288817, -0.9064713920873344], [-0.52544425912004522, 0.94038667193528358, -0.26726556609141006, 0.95974674726009668, 0.55320788782618457], [0.12637911941808322, 0.30456684761940678, 0.35529275308681108, 0.65517009603341125, -0.40606428176396325], [0.62521639928593564, -0.18755646596338837, 0.11061943165104826, 0.28533153784040355, 0.57006195458453957]], [[0.26493418753075915, 0.87833071304902588, -0.28298919539362388, -0.50222990586325378, -0.040632910187410776], [0.85031249695503019, -0.54277990316861335, -0.39245923661963866, 0.93823378468563878, 0.45872698390685795], [0.40659927131778484, -0.67382992392399799, 0.72293711733828392, -0.00022653513814963055, -0.96594616937093059], [-0.78774281559253456, -0.28763697021436418, 0.62067361646158936, 0.70164775941175339, 0.48050239096492908]], [[0.60489714316840892, -0.67682837903376747, 0.36440483682611147, 0.42290277667298759, 0.38434238375069252], [-0.53933850671613781, -0.59922409185675152, -0.074875557481751454, -0.77479980947992466, -0.29673585949412118], [-0.30083987286477942, -0.93721644162017936, 0.39522845320463862, -0.37890757332334468, 0.95180902376140253], [-0.93407456650595577, 0.59397835129938792, -0.63282679890401039, -0.43212635295645985, -0.30920570180851015]]]]),self.functionspace)
61449          res=generalTensorProduct(arg0,arg1,offset=2)
61450          ref=Data(numarray.array([[0.20846894590466161, -0.21350025001741069, -0.44957789465373454, -0.66323616957152021, -0.24305261213454371], [-0.29953753690788193, 1.2434682712086529, -0.5074682566220704, 0.50799633064472838, 0.68410954788752487], [-0.012224784713239064, 0.57766300862504949, -0.20953474812807624, -0.099702584310622941, -0.24704868185486306], [0.79751718381823189, -0.32654295589095927, 0.1823502976995823, -0.39077425918854786, 0.24884005131956072]]),self.functionspace)
61451          self.failUnless(isinstance(res,Data),"wrong type of result.")
61452          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
61453          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61454       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61455       def test_generalTensorProduct_array_rank0_constData_rank3_offset0(self):
61456          arg0=numarray.array(0.729161045519)
61457          arg1=Data(numarray.array([[[0.78719542466743553, 0.85234295949470962], [0.032104578750040469, -0.096502278551340526]], [[0.50764567626009982, -0.96185965444300359], [-0.70501450359437245, -0.10132955328153126]], [[-0.098014097359040653, -0.62284231841207283], [0.1461389597728926, 0.26782573714588076]], [[0.14730407961037217, -0.98677718952359195], [0.87529773002735833, -0.95658399969991681]], [[0.016469832836842668, 0.18102407337026372], [-0.96921997530625692, 0.36289790352438445]], [[0.84420760731995115, -0.82125974198117713], [0.65036851244544325, 0.36285009148825909]]]),self.functionspace)
61458          res=generalTensorProduct(arg0,arg1,offset=0)
61459          ref=Data(numarray.array([[[0.57399223887856909, 0.62149528348623362], [0.023409408207338351, -0.070365702323496607]], [[0.37015545205520034, -0.70135059127655719], [-0.5140691125471899, -0.073885563012771702]], [[-0.071468061705955072, -0.45415235608705329], [0.10655883669911503, 0.1952880945142855]], [[0.10740839669796699, -0.71951948720768455], [0.63823300796747695, -0.69750378934828883]], [[0.012009160530841397, 0.13199570260283602], [-0.70671745053256507, 0.26461101475062643]], [[0.61556330158881856, -0.59883061210596045], [0.47422338450759466, 0.26457615207637686]]]),self.functionspace)
61460          self.failUnless(isinstance(res,Data),"wrong type of result.")
61461          self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
61462          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61463       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61464       def test_generalTensorProduct_array_rank1_constData_rank4_offset1(self):
61465          arg0=numarray.array([0.094563644000015712, -0.40340577007888978, 0.37726109420617804])
61466          arg1=Data(numarray.array([[[[0.52449117797578659, -0.03086789820496838], [0.72570865973216425, -0.13543779489257046]], [[-0.89695118409168506, 0.79734696922266357], [0.22829213541540572, 0.90054010866700551]], [[-0.71596739611373761, -0.53162155555951718], [0.49237680321488253, -0.06317598151523085]], [[0.071880420235407305, 0.71774717019061041], [0.75001622324878681, 0.97946643306530001]], [[0.28594511097352382, 0.73873074829495167], [0.8977634773163321, 0.68508955799222271]], [[0.27209850366205202, 0.33717685000667652], [0.0082416426035361035, 0.3967960145540661]]], [[[-0.16146967042462879, 0.68172064478711825], [0.15474410825306673, -0.098125172279253325]], [[-0.37227015838659416, -0.79802890461166176], [-0.88581970642908892, -0.25082943693023929]], [[-0.89724165678961332, 0.2649908483519805], [-0.34656675884808252, -0.61942744507352399]], [[0.54869740807191691, -0.29205289135149659], [0.50705660033365318, -0.16284580162474138]], [[0.12910234770898432, -0.034040965132912548], [-0.87819921235137355, -0.98840803021110291]], [[0.21126303819558889, -0.93376861633183461], [0.18709519470671587, -0.46152886596377307]]], [[[0.13783755981776658, 0.068615740197387698], [0.26784700445533405, 0.68335128305684067]], [[0.96758007764405951, 0.75300911337638987], [-0.7056423401530143, -0.8805732619896891]], [[0.2247290198120071, 0.79305270266743566], [0.44992426858646883, 0.81832617635379923]], [[0.90106460974855263, -0.69437719254417174], [0.030768346999636709, 0.50095539564394653]], [[0.26969627168110932, -0.34462639139242168], [-0.96896154396936418, -0.96178212370333616]], [[0.40550249449244569, 0.96839729629400972], [-0.79417057858038054, 0.73121170834781246]]]]),self.functionspace)
61467          res=generalTensorProduct(arg0,arg1,offset=1)
61468          ref=Data(numarray.array([[[0.16673634241684321, -0.25204297339927473], [0.10724924317230783, 0.28457862204028717]], [[0.43038727628759221, 0.68141054181174454], [0.11272151568017424, -0.14586163593991391]], [[0.37902949145651482, 0.14201702160552981], [0.3561068968467791, 0.55262908317131842]], [[0.12538619465037187, -0.076272890027687806], [-0.1220175909456483, 0.3473058318040193]], [[0.07670529023885185, -0.046424736261731325], [0.073614923084848072, 0.10067109127331092]], [[0.093486212196292551, 0.77391094298210361], [-0.37430558280317422, 0.4995636138363328]]]),self.functionspace)
61469          self.failUnless(isinstance(res,Data),"wrong type of result.")
61470          self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
61471          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61472       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61473       def test_generalTensorProduct_array_rank0_constData_rank4_offset0(self):
61474          arg0=numarray.array(0.170303473899)
61475          arg1=Data(numarray.array([[[[0.16299614924257644, -0.30845749390788568, -0.29566630182680487, -0.80474190718593475], [0.2691016779449793, 0.43343326414717098, 0.86610946466404282, 0.81037943192221773], [-0.48333691021318304, -0.93480833528417273, 0.64644802086374153, 0.42800956590349348]], [[0.27107237158946917, -0.71924977764247067, 0.72958046337734372, -0.72403719104310249], [0.51262790161186866, -0.22953137082167485, 0.051206987484119448, 0.76489736035255773], [-0.32139134156416738, -0.88271154058596157, -0.96827294084859949, 0.46828011189819208]]], [[[0.87325381066079522, 0.63526408153623026, 0.29502896569193537, -0.41121828371592239], [0.87735333166929808, 0.44805437770807965, 0.42715426653695743, -0.45014923033183574], [0.11122058746477959, 0.088540294825875998, 0.39149149869779998, -0.046853466676531896]], [[-0.40441908731245513, -0.3433187459279825, 0.30970231829985795, -0.80645845620245682], [0.38256980770787696, 0.34446182387752167, 0.37387781617472959, -0.97420202442236437], [-0.59495769997476544, 0.73108455992733701, -0.20589021086236658, -0.46280286594007647]]], [[[0.87429316932515166, -0.018918611841412858, -0.55004861432449981, -0.27876119151367029], [0.50604470531747281, 0.72284043538395015, 0.80737913912957571, 0.13914446576183637], [0.44080224562244452, 0.77483530802879219, -0.1424378513885598, 0.66516119595599488]], [[0.063231228478993318, 0.097353731085751738, -0.91350557376842412, 0.86784298996285969], [0.78632995224149438, 0.84541641731413542, -0.79676254907989241, 0.66234153400905438], [0.65361805846747334, 0.62813428609632793, 0.093673501161051886, 0.88227414180589481]]]]),self.functionspace)
61476          res=generalTensorProduct(arg0,arg1,offset=0)
61477          ref=Data(numarray.array([[[[0.027758810448241404, -0.052531382762826505, -0.050352998316103507, -0.13705034238622077], [0.045828950586196737, 0.073815190587834312, 0.14750145060946576, 0.13801043243300376], [-0.082313954873123998, -0.15920110692904169, 0.11009234364850912, 0.072891515935553777]], [[0.046164566559844904, -0.12249073573390838, 0.12425008740232059, -0.12330604886702869], [0.087302312462278611, -0.039089989819830466, 0.0087207278564703922, 0.13026467764454797], [-0.054734061949577334, -0.15032884181291067, -0.16490024550933788, 0.0797497298142779]]], [[[0.14871815755145223, 0.10818767992915346, 0.050244457758293594, -0.07003190224778473], [0.14941632022052398, 0.076305217019535188, 0.072745855482208702, -0.076661977698668199], [0.018941252414387832, 0.015078719788926784, 0.06667236223033117, -0.0079793081392447607]], [[-0.068873975480549715, -0.058468375086332659, 0.05274338068117413, -0.13734267664685312], [0.065152967261689995, 0.058663045232077021, 0.063672690908490537, -0.16590998903899012], [-0.10132336312891989, 0.12450624026986459, -0.035063818151748055, -0.078816935800209167]]], [[[0.14889516394261959, -0.0032219053179475821, -0.093675189833032413, -0.047473999303123536], [0.086181171263981116, 0.12310223722086623, 0.13749947214770136, 0.02369678589312162], [0.075070153732173975, 0.13195714465724148, -0.024257660906243084, 0.11327926237440823]], [[0.010768497868901401, 0.016579678600974861, -0.15557317263925852, 0.14779667598994684], [0.13391472249790271, 0.14397735276021106, -0.13569142998127415, 0.11279906414962222], [0.11131342596041423, 0.10697345099754574, 0.015952922660049822, 0.15025435128118594]]]]),self.functionspace)
61478          self.failUnless(isinstance(res,Data),"wrong type of result.")
61479          self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
61480          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61481       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61482       def test_generalTensorProduct_array_rank0_expandedData_rank0_offset0(self):
61483          arg0=numarray.array(-0.501038685672)
61484          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
61485          arg1=msk_arg1*(-0.37497860758)+(1.-msk_arg1)*(0.886271009021)
61486          res=generalTensorProduct(arg0,arg1,offset=0)
61487          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
61488          ref=msk_ref*numarray.array(0.18787878869669156)+(1.-msk_ref)*numarray.array(-0.44405606150884158)
61489          self.failUnless(isinstance(res,Data),"wrong type of result.")
61490          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
61491          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61492       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61493       def test_generalTensorProduct_array_rank1_expandedData_rank1_offset1(self):
61494          arg0=numarray.array([0.44038262808839268, -0.80364141181592696, -0.35078298317395173])
61495          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
61496          arg1=msk_arg1*numarray.array([0.71915786866679077, -0.24226928051609842, -0.52239122903446766])+(1.-msk_arg1)*numarray.array([0.80851332796867226, 0.23987618213601136, 0.93431506683977128])
61497          res=generalTensorProduct(arg0,arg1,offset=1)
61498          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
61499          ref=msk_ref*numarray.array(0.69464821255213227)+(1.-msk_ref)*numarray.array(-0.16446103582788724)
61500          self.failUnless(isinstance(res,Data),"wrong type of result.")
61501          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
61502          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61503       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61504       def test_generalTensorProduct_array_rank2_expandedData_rank2_offset2(self):
61505          arg0=numarray.array([[-0.70824728644205526, -0.12630675377204637, 0.4347607103368023], [-0.89056712613274125, 0.010820129422368874, -0.90039689321841987]])
61506          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
61507          arg1=msk_arg1*numarray.array([[0.93739717147838908, -0.77123682199279786, -0.86427598943106121], [-0.91576441578160006, 0.13385047078992351, 0.76249883166202981]])+(1.-msk_arg1)*numarray.array([[-0.39496786944253803, 0.66327871398525273, 0.18532728600071824], [0.6362315985772391, -0.77080221962759832, 0.94099837319284996]])
61508          res=generalTensorProduct(arg0,arg1,offset=2)
61509          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
61510          ref=msk_ref*numarray.array(-0.8118034424514643)+(1.-msk_ref)*numarray.array(-1.1456877747602543)
61511          self.failUnless(isinstance(res,Data),"wrong type of result.")
61512          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
61513          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61514       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61515       def test_generalTensorProduct_array_rank3_expandedData_rank3_offset3(self):
61516          arg0=numarray.array([[[0.63350363851439639, 0.012863304921566288, -0.46484188959811634], [-0.44497572695987198, 0.7313619267681537, -0.7824611232916332], [-0.93700843427874925, -0.44281317878576698, -0.053511743398166445], [-0.21279837170704141, -0.71697082293404168, 0.91122771589265805]], [[-0.15825541058242831, 0.44839519324233112, 0.93358871086947182], [-0.37114035164923109, 0.78805681132652072, -0.8138475994924752], [0.52088536280998121, -0.77960719617666063, 0.54954337829857813], [-0.46568975258154666, -0.54470171069547657, 0.58430452780377817]]])
61517          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
61518          arg1=msk_arg1*numarray.array([[[-0.40379817428308384, 0.60389726258914656, 0.43953608931572186], [0.4838417639649768, 0.97973014911472811, 0.38509984207315728], [-0.33557566738890166, 0.74565707877513576, -0.42293605603757567], [0.93428852170931109, 0.20392914562930908, -0.19015381696316624]], [[-0.28771663480511722, -0.11363849155085948, 0.15885662403426482], [-0.61281402347548886, -0.19979936417795652, 0.18520201905341604], [-0.26478689551969237, -0.26876353904713635, -0.42756925441662252], [-0.10336812618250768, -0.62661268118795377, -0.50758733772388442]]])+(1.-msk_arg1)*numarray.array([[[-0.67885234584521226, -0.2383304710343972, -0.95102911225053433], [-0.77162854554669535, -0.18252965123420073, -0.057560358501999254], [-0.28069888586616965, -0.60672292004101647, -0.37769655089940013], [-0.59269449422648113, -0.27619032325379833, 0.013919747588113873]], [[-0.038406445356485186, -0.62545888435942398, -0.34531503961876164], [0.83724853491667051, 0.61060148536269532, 0.33308338973850815], [0.42834232810198802, -0.24493617999638184, 0.75888014236571077], [-0.84795287270528363, 0.62773712077388999, 0.27063716628400281]]])
61519          res=generalTensorProduct(arg0,arg1,offset=3)
61520          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
61521          ref=msk_ref*numarray.array(-0.77220523654832762)+(1.-msk_ref)*numarray.array(1.497391405841505)
61522          self.failUnless(isinstance(res,Data),"wrong type of result.")
61523          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
61524          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61525       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61526       def test_generalTensorProduct_array_rank4_expandedData_rank4_offset4(self):
61527          arg0=numarray.array([[[[0.66692221453488321, 0.70236643546384081], [0.78031380564159125, 0.51817208183024732], [-0.73155397777526199, 0.41333534504253611]], [[-0.050532058185003947, 0.61603390263605085], [0.1468977566735139, 0.92574095795931521], [-0.2111592868010268, 0.96299120541748384]]], [[[-0.37394494763727648, -0.014102034485046877], [-0.10581395189470788, 0.80096492843200551], [0.89288408725661816, -0.34044229611468313]], [[0.47426149830902542, 0.39436501306897065], [-0.14167997130606569, -0.62207238623596672], [-0.37185543809384591, -0.060608338166359799]]], [[[0.26383584038706931, 0.050438879214178556], [0.75974254183593204, 0.64834976706573566], [-0.87058844559025128, -0.51116367530358953]], [[-0.23990103772999727, -0.15064442054769689], [0.21915152648611569, 0.91076111295643902], [-0.86736114625524463, 0.15192583520059211]]], [[[-0.19437893616374713, -0.34856783741186081], [0.64470469827147725, -0.28657566195229722], [0.040736307101837843, -0.81189918724736865]], [[-0.43138598569616682, 0.6569786694570392], [-0.88548264551389533, 0.22424181301194968], [0.49028931081399829, 0.12533075955312345]]]])
61528          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
61529          arg1=msk_arg1*numarray.array([[[[-0.46340779133960219, 0.36431041531567199], [0.26951798090514512, -0.39609372305210022], [0.28526948474899316, -0.75551992572189408]], [[-0.54305547329011117, 0.26118735978137364], [0.94607798188040948, -0.50746815991997085], [0.668461028276504, 0.17534199507844028]]], [[[0.69954540197006621, -0.58989378545627336], [-0.77491029045897619, -0.76545382519911498], [-0.25250868270646687, -0.46481158423696556]], [[-0.76607140109887029, 0.55118334352692822], [-0.626460377392007, -0.9811309325713633], [0.3686601252945938, 0.074166702980152044]]], [[[0.60599601425914873, -0.55895950980763032], [-0.73036937902853416, 0.44910078910514262], [0.72914971761458025, 0.29351120043732104]], [[0.26115112507488458, -0.1804659513394633], [-0.46578546574459878, -0.54589922469878194], [-0.2109275840716307, 0.20216313022050536]]], [[[-0.93791559744495201, -0.27942365974895433], [0.98190776398441426, -0.10901959474963396], [0.24203914236980006, 0.083994807064014632]], [[-0.18910747704590225, 0.77000442816012948], [-0.58626375608555215, 0.82046002639811633], [0.38046723009345196, -0.29851908605949395]]]])+(1.-msk_arg1)*numarray.array([[[[-0.063843541440743001, 0.82579210086531196], [-0.75392928943450777, 0.96515854653631816], [0.04513414472199373, -0.58391601323413722]], [[0.51050537414761421, -0.39055883895901622], [-0.035983227726216871, -0.67985051461074297], [-0.46202605176115275, -0.32058592584661327]]], [[[-0.94295560179225624, -0.95635626340976576], [-0.56137374534821216, -0.95428648114901637], [0.90744174531924093, 0.12944161238629848]], [[-0.89864854245762937, -0.57163922613177331], [-0.59408436108929119, -0.69495540700078506], [-0.43417863882441132, -0.47493704913215007]]], [[[-0.52757591056894726, 0.46829257906798505], [0.77931221581068466, 0.83301505980319068], [-0.96930280734831697, 0.10868224224462741]], [[-0.62766844886146278, -0.40104067060462034], [-0.51320226272568847, -0.37356414336340404], [0.97201855282411853, 0.94271809432690068]]], [[[-0.032280060413461653, -0.36020188198684688], [-0.41169336168295434, 0.61931290291263963], [-0.57962639671584393, 0.78323224929846846]], [[-0.66356437187182316, 0.1114302921832302], [0.22662244560360123, -0.36488034809040859], [0.12382732557364684, 0.81246926773550343]]]])
61530          res=generalTensorProduct(arg0,arg1,offset=4)
61531          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
61532          ref=msk_ref*numarray.array(-0.13645802998092274)+(1.-msk_ref)*numarray.array(-0.3226720375795763)
61533          self.failUnless(isinstance(res,Data),"wrong type of result.")
61534          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
61535          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61536       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61537       def test_generalTensorProduct_array_rank0_expandedData_rank1_offset0(self):
61538          arg0=numarray.array(-0.874708255678)
61539          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
61540          arg1=msk_arg1*numarray.array([0.14654086700981339, 0.29310796739100886])+(1.-msk_arg1)*numarray.array([-0.9215158534245409, -0.30896457872014915])
61541          res=generalTensorProduct(arg0,arg1,offset=0)
61542          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
61543          ref=msk_ref*numarray.array([-0.1281805061677056, -0.25638395888193338])+(1.-msk_ref)*numarray.array([0.80605752472866621, 0.27025386771861076])
61544          self.failUnless(isinstance(res,Data),"wrong type of result.")
61545          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61546          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61547       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61548       def test_generalTensorProduct_array_rank1_expandedData_rank2_offset1(self):
61549          arg0=numarray.array([0.2892485283016033, -0.20014935288134739, 0.087006388727603357])
61550          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
61551          arg1=msk_arg1*numarray.array([[0.98893987430714647, -0.88028128897717206], [0.88844404657015219, -0.28295984513968886], [0.45513009395447646, -0.70192724421712316]])+(1.-msk_arg1)*numarray.array([[0.084565234308185522, 0.82592053483818861], [-0.1001636044559262, 0.73723539179415098], [-0.40814274945400886, 0.97632878400553325]])
61552          res=generalTensorProduct(arg0,arg1,offset=1)
61553          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
61554          ref=msk_ref*numarray.array([0.1478271281060469, -0.25905799210082081])+(1.-msk_ref)*numarray.array([0.0089970234678914754, 0.17628595431432692])
61555          self.failUnless(isinstance(res,Data),"wrong type of result.")
61556          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61557          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61558       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61559       def test_generalTensorProduct_array_rank2_expandedData_rank3_offset2(self):
61560          arg0=numarray.array([[-0.3779633899829653, -0.88393082872430706, -0.31590593488209229], [-0.027735783300006034, 0.18453001551873927, -0.38062223999076217]])
61561          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
61562          arg1=msk_arg1*numarray.array([[[0.65241925838380443, -0.93810039747206297], [0.20699238934346043, -0.28729202466167036], [-0.73017695169441343, 0.40255584953621404]], [[0.59613475429153584, 0.11806038179459866], [0.26628809400784981, 0.78577158973314765], [-0.30370944851659898, 0.69330371535762203]]])+(1.-msk_arg1)*numarray.array([[[0.83772175836918339, 0.60287463850061318], [-0.18527744936965096, 0.54931735571376561], [-0.37167308309872249, 0.73168804739011128]], [[-0.46383496026335846, -0.39094945287159288], [-0.4114599857806287, -0.83457293926382259], [0.49096479229265522, 0.81391664509909445]]])
61563          res=generalTensorProduct(arg0,arg1,offset=2)
61564          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
61565          ref=msk_ref*numarray.array([-0.050687863928685628, 0.35918123517652517])+(1.-msk_ref)*numarray.array([-0.2853759841192921, -1.3975229289751401])
61566          self.failUnless(isinstance(res,Data),"wrong type of result.")
61567          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61568          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61569       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61570       def test_generalTensorProduct_array_rank3_expandedData_rank4_offset3(self):
61571          arg0=numarray.array([[[-0.43001183753684313, -0.67833462383068355, -0.84552602616504191], [-0.58683473152759102, -0.60386885707976745, -0.61327103323861998], [0.61468312546560844, -0.75492434588748036, -0.78818981309419578], [-0.54034954365244792, 0.52022532947355415, -0.57477303982479921]], [[-0.65648081838552241, 0.80790367863986634, -0.03074902541822655], [-0.88980529844214606, 0.091391289713685708, 0.34903087642085073], [-0.54438954610923873, -0.64383004912714759, 0.30601151055436326], [0.38803860206514162, 0.80139910770437583, -0.77980376439441423]]])
61572          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
61573          arg1=msk_arg1*numarray.array([[[[-0.52631928814506224, 0.52114146151519081], [0.92539527175661851, -0.28115407372136247], [0.13068516078127912, -0.21000051854384694]], [[0.88002789810803805, 0.28365158093793186], [0.81529253278395974, 0.44416599290101022], [-0.19322585923808755, -0.0086189852172304793]], [[0.59776010693329362, 0.39550010260117485], [-0.22191964410150256, 0.91173026317810102], [0.80754985806063218, -0.32152153998509747]], [[0.26670484968560548, -0.27662395810407614], [0.18357345701842753, -0.84421981535555868], [0.085582139456202189, 0.13902170637390454]]], [[[-0.13696484377814966, -0.76083195907288292], [0.69804413089398709, -0.4149668879314421], [0.72484293975385339, 0.51710470976854084]], [[0.53872850448765086, 0.58001248605062394], [-0.97359855532336947, 0.34719604209795807], [-0.022826739261370799, 0.81616552372115692]], [[0.5906989436878114, 0.75409887638106921], [0.22312151836905403, -0.012909715589096038], [-0.37827158040829789, 0.36754054624002785]], [[-0.050944348130106398, 0.15249839291881218], [-0.39456849710011177, 0.74654477024305721], [0.11126598640053387, -0.22730210487646541]]]])+(1.-msk_arg1)*numarray.array([[[[-0.95312417667446159, 0.95479440417988259], [0.6437071563109682, 0.42987924404781164], [-0.1499709638358957, 0.43023213230326296]], [[0.93140872857267154, -0.89037057424834876], [-0.11728818817059539, -0.83920015046545027], [-0.10646147420581453, 0.011809961683704628]], [[0.65330829646027699, 0.7347028036831309], [-0.51628909010371493, 0.78489332676857981], [-0.58510280417275307, -0.32208582652772799]], [[0.69176337155418688, -0.41703379415680497], [0.44919833195877223, 0.28016566960863321], [-0.62420723416190027, -0.23459325986858892]]], [[[0.0657887446833334, -0.5078899406539823], [-0.14155361249305343, -0.87099688187411051], [-0.9516783982658148, 0.051991011281497634]], [[-0.3214501297041279, 0.94726305461156812], [0.78684050949034612, -0.51127235557511885], [-0.51139598833539557, 0.6176469440750012]], [[0.54197304987078243, -0.72835240064770468], [-0.63469061263345949, -0.68225774302319264], [-0.72040690925145934, 0.30787449549031676]], [[-0.90305329024928471, 0.11589149416066991], [-0.98976197368375352, 0.2721992361129435], [-0.54406110828611021, 0.5184134839815393]]]])
61574          res=generalTensorProduct(arg0,arg1,offset=3)
61575          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
61576          ref=msk_ref*numarray.array([-2.5499534018495988, -0.3528016548882395])+(1.-msk_ref)*numarray.array([0.38566076603801253, 0.3178879452215792])
61577          self.failUnless(isinstance(res,Data),"wrong type of result.")
61578          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61579          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61580       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61581       def test_generalTensorProduct_array_rank0_expandedData_rank2_offset0(self):
61582          arg0=numarray.array(0.246720077242)
61583          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
61584          arg1=msk_arg1*numarray.array([[-0.90606308924596823, -0.41069377717229494, 0.52409905991619588, 0.82402330879009367, -0.029874051064125773], [0.075536381703545041, -0.85747704312966011, 0.14046776773330616, 0.74443505055412396, -0.81767919596405192], [-0.79611289784131944, -0.19503473823432049, 0.44762448588483883, -0.45671928577572496, -0.61527798064175143], [0.97183668249216892, 0.47513629707242799, -0.82237067477448278, 0.92125554787705632, -0.99368761422211782]])+(1.-msk_arg1)*numarray.array([[0.71563952655324181, -0.36819307717015937, -0.60098500904966734, 0.24922312481795217, 0.32024626460365546], [0.52397777755136032, 0.012686857024190701, 0.99978450698005839, -0.41594934988402432, -0.21161406541893024], [-0.47691438338475045, 0.58504726934022555, 0.87044255777491752, -0.32328077177959025, 0.17285650560197818], [-0.34784494744696026, 0.61632440573505276, 0.6052446913779741, 0.78601098711335626, -0.49589140523425912]])
61585          res=generalTensorProduct(arg0,arg1,offset=0)
61586          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
61587          ref=msk_ref*numarray.array([[-0.22354395536474614, -0.10132640042669194, 0.12930576054489998, 0.20330309439376909, -0.0073705281860678056], [0.0186363419284678, -0.21155680231405496, 0.034656218505150244, 0.18366707317424708, -0.20173787438729712], [-0.196417035648636, -0.048118985682013747, 0.11043794773284669, -0.1126818174644252, -0.15180143090913673], [0.23977162137092217, 0.11722566391411163, -0.2028953564017851, 0.22729223993170167, -0.24516268493514137]])+(1.-msk_ref)*numarray.array([[0.17656263926853016, -0.090840624439332746, -0.14827506785392228, 0.061488348605538076, 0.079011183139424845], [0.12927583775047968, 0.0031301023449645197, 0.24666691078731567, -0.10262305573207993, -0.05220943856561841], [-0.11766435350643048, 0.14434290748174847, 0.21475565508881309, -0.079759856984262398, 0.042647170413874738], [-0.085820332302298075, 0.15205960498898383, 0.14932601700698783, 0.19392469145354274, -0.12234636580296136]])
61588          self.failUnless(isinstance(res,Data),"wrong type of result.")
61589          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
61590          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61591       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61592       def test_generalTensorProduct_array_rank1_expandedData_rank3_offset1(self):
61593          arg0=numarray.array([-0.45898756380933037, 0.88983535078897669, -0.93601582386512105])
61594          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
61595          arg1=msk_arg1*numarray.array([[[0.85242562280855316, 0.81174138665070905, -0.34012550800122687, 0.34758312551507897, 0.26793731579633984], [-0.22156781629023947, -0.33053084124743548, -0.9232944731653745, 0.1068871638491351, -0.49779757627283239], [-0.78537035377840958, -0.21886959538687889, 0.52247528432916046, -0.52722844717407402, -0.96038601029480741], [0.029908729932515365, -0.61732773958940257, -0.19929118801933221, -0.27953522474954773, 0.90108371942625731]], [[0.084225678094832279, -0.023714294740967423, 0.21836023456079601, 0.94385311099605307, 0.11021975958514818], [-0.10698176723360175, 0.58192355928131878, 0.71031788640458982, -0.048329163621356308, -0.061722169078396005], [0.38733073278731878, -0.52072790429793914, 0.41516080090406215, 0.33751425915179234, -0.23451160480295163], [-0.31754221530628568, -0.62142882926223897, 0.26735178472188759, 0.605302787951701, 0.45754720795975157]], [[0.36684565227343136, -0.96975721436593609, 0.22078755039429643, -0.79362315968720742, 0.3667120169226652], [-0.94967278938118627, -0.68731033549091536, -0.0051219726794407006, -0.4970685936575685, -0.97365752935427241], [0.93857640099798578, -0.79974261569970606, 0.4713594604980047, 0.28733078923508604, 0.698123283943757], [-0.67384865621491841, -0.79939314063274058, 0.35458508209965145, 0.95301187439504198, -0.97831639629936129]]])+(1.-msk_arg1)*numarray.array([[[0.72714071831087601, -0.069880915555535772, 0.63661806717395186, 0.91652507007398865, 0.43388651012901036], [-0.43994170474778538, 0.50193110150742548, 0.012195024468751647, -0.81011667336280713, 0.35867188021786234], [0.63456002432073988, 0.12686757195357812, -0.31753861162141606, -0.2713929291157926, 0.0062677001459554571], [0.28240715099030056, 0.96490579712169278, -0.80554150665350055, 0.39297250550849117, -0.92586690440310981]], [[0.24093560956733051, 0.73574827125879128, -0.29589772664313663, 0.68855053836914593, -0.50420649671382933], [-0.41570011382358185, -0.11849406919389804, 0.70934019905166501, 0.14959503558013476, 0.55658836091190578], [0.21647538656634957, -0.36103768109385581, -0.087766955544852587, -0.35080045403584581, 0.69133554630830929], [0.24625237634091124, 0.8186658776186384, -0.88284083282306636, -0.81056468701951134, -0.6613670526779627]], [[0.5843108954601135, -0.26934257233015146, 0.42756771750303102, -0.68148742930164796, 0.88067974610692179], [0.077404089928057696, 0.50384458646633989, -0.91409329566927866, 0.92145702282272657, 0.19650029237078437], [0.074281284173659312, -0.31617866194376565, 0.87744747244144938, 0.54492479150563344, 0.51327357845032595], [0.60913616523699399, -0.14723265662421592, -0.30131458551603196, 0.91534161518928614, -0.16136397835280158]]])
61596          res=generalTensorProduct(arg0,arg1,offset=1)
61597          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
61598          ref=msk_ref*numarray.array([[-0.65967910957264797, 0.51402707867231801, 0.14375739334418389, 1.4231813677681031, -0.3681507080377549], [0.89540947219819222, 1.3128590500190129, 1.0606408940146683, 0.3731991920079154, 1.0849191833313432], [-0.17338655939051062, 0.38566806830619932, -0.31158481475318872, 0.27337725432032672, -0.42132592172218375], [0.33444498147167767, 0.47862104411059431, -0.0025260017320665185, -0.22511118430788257, 0.90927508681257729]])+(1.-msk_ref)*numarray.array([[-0.66627976839463887, 0.93887820197710825, -0.95571018247106188, 0.82990601835371725, -1.4721394552408742], [-0.2404283383314556, -0.80742685080986487, 1.481204409515817, -0.35754992510386352, 0.14671868381582179], [-0.16815616551488571, -0.083546498633702226, -0.75365658472707486, -0.69764689336965802, 0.131865820540083], [-0.48065839010178329, 0.42341017365332678, -0.13381422847539171, -1.7584128416179854, -0.012507151316245857]])
61599          self.failUnless(isinstance(res,Data),"wrong type of result.")
61600          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
61601          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61602       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61603       def test_generalTensorProduct_array_rank2_expandedData_rank4_offset2(self):
61604          arg0=numarray.array([[-0.15567837122009331, -0.99458185572550151, -0.33226843547045659], [0.92930130927476728, -0.37142212420915421, -0.96245710875878232]])
61605          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
61606          arg1=msk_arg1*numarray.array([[[[-0.35127871779755471, -0.97956450989628086, -0.60744994194165369, -0.038418047339281669, -0.10029756097954978], [-0.6369298408416797, 0.44643445887674393, 0.21964290198361081, 0.92953218811876437, 0.97103733264071934], [-0.0084197182499485823, -0.043538373006895004, 0.6786658762552189, 0.90131480922601503, 0.54793303378730029], [-0.47112100116818256, -0.37272322946487479, -0.18755038677313451, 0.42443008032841334, 0.48097249500434125]], [[0.34855610480392829, 0.33060143769110972, 0.23547431013984288, 0.53782333559518292, -0.079353483176874073], [0.23698099293470309, -0.1667415355358739, -0.20272943860278869, -0.96054949810501178, -0.40383757079019023], [0.020374036923875849, -0.060923575007736153, 0.11376424710596056, -0.58646147084217004, 0.23177634402632163], [0.59762081954918722, 0.86850410144418344, -0.15526430031954841, 0.60439399241076419, 0.2833946544584125]], [[0.85295491254935207, -0.43042679554314067, -0.49819931812536455, 0.094055101122851203, -0.36880858083543644], [0.85797239083026411, -0.76918517380349716, -0.90024063221013351, -0.22339105759424061, -0.046532099466895849], [0.7614283619803015, 0.80185876338157525, 0.82994826285351597, 0.75516258598893016, -0.97670968888752507], [0.75955635097176355, -0.90881364204951831, 0.32602819230807079, 0.083173009841529977, 0.501732633561361]]], [[[0.2650940311750436, -0.0059478044912930628, -0.41191591020874063, -0.12014053171499217, 0.20117563104180558], [-0.85257783450818647, 0.51007282849774804, 0.14245159715060685, -0.63328211292436287, -0.8697637267495868], [-0.0026202687159828653, -0.73209555573520801, -0.76351605990178295, -0.29674919348051088, 0.39078919825820035], [-0.58449899116503756, -0.94379815050822558, 0.81377078572032402, -0.70125898657220076, 0.7117592064496423]], [[-0.93085731079390865, -0.48006211845588509, 0.51975508101155743, 0.8443893547227741, -0.093203952092502762], [-0.73419105384658745, 0.44366335500045739, -0.54432407567258778, 0.034936359584416099, 0.6516213147001535], [0.58736121590976542, 0.83114917192559545, 0.28065847836369651, 0.022859303816783472, 0.859996216145823], [-0.73778138930524029, -0.15574464335337601, 0.75031664084905025, 0.54855170139855747, -0.32672276272079714]], [[-0.16299372657036959, 0.72747842680200403, 0.57758779444496366, -0.1864924392052687, 0.082207658998947553], [0.25507613542080221, 0.8765126238226757, 0.051137225946723097, -0.26589640779286383, -0.3912484901216835], [0.33466537029520227, 0.089808154574321897, -0.58495623444226363, 0.13068829255844583, 0.02863071040379106], [0.88114852531025889, 0.031716523229728733, -0.35560578463881942, -0.037972535794119189, 0.1953933902403584]]]])+(1.-msk_arg1)*numarray.array([[[[-0.5400576969613653, 0.54390449059242485, 0.64252932691754272, -0.67716585248690264, 0.62032550673818077], [0.38686651228491309, 0.70562149983910283, -0.3797375428798222, 0.42131084317286249, -0.23401239469472968], [-0.81222205619556331, -0.31477452773598213, 0.65523992331279235, 0.84485811902262431, 0.85372296262510772], [-0.8153916842378639, 0.90033465417130198, -0.42657592639282749, 0.97028575035532749, -0.27057293549112438]], [[0.052779171139729408, 0.36233793941474812, 0.86944888051629454, -0.17889593274284032, -0.29398276355410724], [0.78490974759228194, -0.79157704322053202, -0.080138009805514665, 0.45356570526421947, -0.034120451956423548], [-0.53448585528819592, -0.77887668081327566, -0.33583358701952992, -0.92924300429544981, 0.55815450679709055], [-0.67832365077414014, 0.58981723503723815, -0.47808607678761939, -0.36774208196354441, 0.56454027091525583]], [[0.30531597496592267, -0.5137220047053348, 0.5399701460049755, 0.62699661456074529, -0.33008771690995675], [0.4038318412213413, 0.71665310930417392, 0.17155433840257439, 0.49938460899411519, 0.76594724141017734], [0.093659296418102445, 0.69852696787255919, 0.97343788252166186, -0.73352088248911596, 0.24457026362353562], [-0.05159937476167098, 0.0089173339495294268, 0.63630412968308092, 0.19929173696907432, -0.6899602289422393]]], [[[-0.041410357421850952, -0.38889962330894945, 0.76265307793920667, -0.6172823784055359, 0.75349588051567595], [0.43340267750760852, 0.90213377312990706, -0.30519183664875094, -0.45301089881026768, -0.25485997032818175], [0.1028116379592845, 0.46583104682036325, 0.23805065016850846, 0.12116867505618378, -0.73215373850345622], [-0.61450129597264058, -0.21160824510167164, 0.2740254445277146, -0.73326188821149674, -0.65848204769696772]], [[0.05465618403094008, 0.73479651092063558, -0.11624751259705235, -0.96407216617836444, -0.71692326121970029], [-0.39937135886439812, 0.95816590731535523, -0.77458905285943214, -0.28840726524892157, 0.41894583661925133], [-0.95805087709319592, 0.39999600705773086, -0.91177445190169304, 0.22938168173475115, -0.95555272902848776], [0.10882185573061198, -0.39229951167354637, -0.3916511170457424, -0.76865359478173878, -0.97727821625370059]], [[0.40999321198896133, -0.88135565882772182, 0.63565529375876584, -0.37317089007892901, 0.555290126540674], [-0.29038581494590576, 0.42164379201880831, -0.44899645286707468, 0.43518447818908657, 0.57581862344993118], [0.742256366774243, 0.20714822805684063, 0.51816577049514523, -0.4792865629173042, -0.68267272302722626], [-0.20661401354081876, -0.044969253011393873, -0.72969509807854416, -0.58480750239810297, -0.94644086867131372]]]])
61607          res=generalTensorProduct(arg0,arg1,offset=2)
61608          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
61609          ref=msk_ref*numarray.array([[0.17357662755437517, -0.56068434011508095, -1.1058417604311526, -0.80596068079916849, 0.35953058702351004], [-1.1867246763814974, -0.18246697340244233, 0.75189599198649326, 0.53929069680721775, -0.40779809418743429], [-0.81464652432281048, -1.2745419377179736, -0.74535102121815788, -0.21798971586117438, 0.024891393064954859], [-1.8906310830059134, -1.3535550326000345, 0.89510108868401261, -1.5137078435385907, 0.071286954422171256]])+(1.-msk_ref)*numarray.array([[-0.52324886143927274, -0.060412889488976718, -1.0040605900159618, 0.21861292691146322, 0.73755932643826372], [-0.1444833899391284, 0.51597296627785161, 0.51804280694792126, -1.4153361263447299, -1.1307820248483642], [0.36390967761232795, 0.67652048804950649, -0.030273718808280836, 1.5251054682606959, -0.43773431244205419], [0.40611351058859685, -0.73740522531452113, 1.43290093380566, 0.31540459956650063, 0.37185611346040481]])
61610          self.failUnless(isinstance(res,Data),"wrong type of result.")
61611          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
61612          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61613       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61614       def test_generalTensorProduct_array_rank0_expandedData_rank3_offset0(self):
61615          arg0=numarray.array(0.397935405161)
61616          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
61617          arg1=msk_arg1*numarray.array([[[0.64855136176452, 0.2042764526055143], [0.57156517001528928, 0.113069690854112]], [[-0.46322457785304105, -0.58741275123160652], [-0.34660809943833559, -0.070136876600527254]], [[0.93904108736278591, 0.0978246757865604], [0.90358035912154144, 0.58162970040061435]], [[-0.0044565980623507695, 0.37244165415216379], [0.63865927635948805, 0.87488924597310436]], [[0.12941567762514139, 0.18188069069073864], [-0.041115943834846069, -0.96717599327038872]], [[-0.39484846078645952, -0.22972143995780026], [0.80257758473262064, 0.11524735232116123]]])+(1.-msk_arg1)*numarray.array([[[-0.11353099149817547, 0.14689562504283704], [-0.52872914834391271, 0.91405375689433854]], [[-0.091757433519643827, 0.28429622420916467], [-0.84808463946975055, 0.070875029823600944]], [[0.44839088032488283, -0.84297869442304929], [0.23290100156517934, 0.82996096337244207]], [[0.39393350042807462, -0.74292813703585603], [0.9539033621723203, 0.86285011420744029]], [[0.50084397874038711, 0.61907542037323404], [0.41962142966880744, 0.41222973493565696]], [[-0.081781889957842857, 0.64626820347226288], [0.80126051994452197, -0.11848439795557497]]])
61618          res=generalTensorProduct(arg0,arg1,offset=0)
61619          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
61620          ref=msk_ref*numarray.array([[[0.25808154891149304, 0.081288832932430458], [0.22744601750595925, 0.044994433241461913]], [[-0.18433346006849058, -0.23375233115809657], [-0.13792763448208387, -0.02790994640675901]], [[0.37367769556255143, 0.038927901993869966], [0.35956661630256714, 0.23145105048259895]], [[-0.0017734381555813534, 0.14820772054388037], [0.25414513789795429, 0.34814940656732324]], [[0.051499080109948102, 0.072376766340984555], [-0.016361489768497058, -0.38487357074406042]], [[-0.15712418222026339, -0.091414294283779299], [0.31937403635372524, 0.045861001839655677]]])+(1.-msk_ref)*numarray.array([[[-0.045178001100158342, 0.058454970067802078], [-0.21040004786667396, 0.36373435208869764]], [[-0.03651353148417448, 0.11313153316642105], [-0.33748290461822955, 0.02820368370865375]], [[0.17843060663258697, -0.33545106830734062], [0.092679554420246113, 0.33027085222744007]], [[0.15676008709934322, -0.29563740921688236], [0.37959192091049787, 0.34335860979036686]], [[0.19930355160251134, 0.24635202823144933], [0.16698222362950177, 0.16404080659103898]], [[-0.032543909515207844, 0.25717299939141702], [0.31884992964364989, -0.047149136905710806]]])
61621          self.failUnless(isinstance(res,Data),"wrong type of result.")
61622          self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
61623          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61624       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61625       def test_generalTensorProduct_array_rank1_expandedData_rank4_offset1(self):
61626          arg0=numarray.array([0.58094125486846315, -0.70531568726399341, 0.33962817234815112])
61627          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
61628          arg1=msk_arg1*numarray.array([[[[0.80357271142620523, 0.35558076743542011], [-0.43626897980642543, -0.85549536630258305]], [[-0.26754631653407501, 0.51743370193875693], [0.51753892488071562, 0.572824830754044]], [[0.97802273451540866, -0.74073345776348076], [0.41953325134180197, 0.7159440736068543]], [[-0.49036398122427816, 0.16694033660312968], [-0.89027232449679583, 0.91717194477620434]], [[0.25437986062316043, -0.00032194374216909516], [-0.62727316519705067, 0.96501042929144187]], [[-0.30576117185470064, 0.71147194680507875], [-0.8685379364364334, -0.9799141708690291]]], [[[-0.5383524028113742, 0.93935638517202324], [-0.40058327869371579, 0.169001438718964]], [[0.89779941446224787, -0.59221892360934625], [-0.97768845916725589, -0.081232361131200026]], [[0.49596054779976373, 0.28221056664423583], [0.083800757378065027, 0.28310349410868851]], [[-0.7560893507215658, -0.10090400663602206], [0.25474857558133479, -0.19606517118931222]], [[-0.69278299536328758, -0.35485094837221354], [-0.5456964771558821, 0.20984835862543139]], [[-0.8549814931696289, 0.33794492467712778], [0.36372574439646055, -0.22652827274814791]]], [[[-0.93422963907949774, 0.39846342895261011], [-0.070648900709936679, 0.46837319791630705]], [[0.032549671152720672, 0.96148955261804536], [-0.70687807605514852, 0.81748535012338919]], [[-0.64116199224960324, -0.02727827115942083], [-0.43022179668698768, -0.10802839892530125]], [[-0.67840300363556549, -0.56043397572882103], [-0.87204383998131041, 0.38368378844084194]], [[-0.89762178008906024, -0.51113241729478442], [0.22367035129835267, 0.6899640311800832]], [[0.48373441406902007, -0.10496738262185956], [0.40700201672702718, 0.21849992849304889]]]])+(1.-msk_arg1)*numarray.array([[[[-0.6252940686336419, -0.93451677888993334], [-0.14336387160241482, 0.66170242429170933]], [[-0.075909979796753957, 0.1029834249310142], [0.0019371382625155142, -0.35648770504344762]], [[-0.64392168474876854, 0.86879994937514926], [0.71800682712291364, -0.54147309355287843]], [[-0.26550760514699556, -0.34165457051337755], [-0.9361129944281994, -0.66826907994971707]], [[0.2993232633527716, 0.69894974758462025], [0.15523651580784414, 0.83774155108624115]], [[0.66048860953118727, 0.36808214664022665], [-0.79256479641945399, -0.47391112872752794]]], [[[0.020578229008302973, -0.12657871373282181], [-0.24339439264094431, 0.1049992497018053]], [[-0.66158434727238991, 0.39006901220476586], [0.010907168410064561, 0.87973022625247665]], [[-0.13464073186116621, 0.71767880499566128], [0.72032828223356082, 0.7876183104671588]], [[0.66001431464881066, 0.48557099561277561], [0.69659179969725282, 0.78918487272905424]], [[0.91896245160112944, -0.85352109578245883], [-0.74121612227355405, 0.86130125487461084]], [[0.74853381218847259, 0.9715538622996307], [-0.50918578502972944, -0.58292738572585412]]], [[[-0.85450489940620789, 0.91158194984001839], [0.678538801711281, 0.028877641832678824]], [[0.086414830881134996, 0.7798651220646573], [0.26810304672424934, 0.64519421687674172]], [[0.1071921599369059, -0.20721273450354616], [-0.6286256537829138, -0.90842770005264128]], [[-0.34685350204025611, 0.59014494374069204], [-0.84383192775778637, -0.94621546980649129]], [[-0.47166175955858858, -0.89620995115135282], [0.60116289046449523, 0.19581635274526943]], [[-0.42171845838347832, 0.41656989319770021], [-0.2106968213483944, 0.13888209876526769]]]])
61629          res=generalTensorProduct(arg0,arg1,offset=1)
61630          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
61631          ref=msk_ref*numarray.array([[[0.52924622945907696, -0.32064185102964965], [0.0050966649028711536, -0.45711918434747367]], [[-0.77760591857525996, 1.0448488207193125], [0.75016301092751858, 0.66771309000119361]], [[0.00060832444521816131, -0.63863463362070383], [0.038502742197060208, 0.17955462533400071]], [[0.018004241202196819, -0.022187459476025323], [-0.99304474361382078, 0.80142068532213695]], [[0.33155282531160718, 0.076499941412134731], [0.096444178707782061, 0.64693625336426197]], [[0.58969241553777563, 0.13931566845859278], [-0.62288164099583243, -0.33528989233766221]]])+(1.-msk_ref)*numarray.array([[[-0.66798720587737304, -0.1440224861847651], [0.31883478894274869, 0.32016027946925457]], [[0.4518754907352947, 0.049569692771371465], [0.084487714309758447, -0.60845981116184855]], [[-0.24271097387915697, -0.071843669067361907], [-0.30443803217179921, -1.1786112478742805]], [[-0.7375639922223034, -0.34053222674852002], [-1.3217328770211167, -1.266210979440948]], [[-0.63445902226276885, 0.70367241396816671], [0.81714650875932926, -0.054305908580975726]], [[-0.28747502780293577, -0.32993920445600089], [-0.17285544183730611, 0.18300157724465718]]])
61632          self.failUnless(isinstance(res,Data),"wrong type of result.")
61633          self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
61634          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61635       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61636       def test_generalTensorProduct_array_rank0_expandedData_rank4_offset0(self):
61637          arg0=numarray.array(0.230590279322)
61638          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
61639          arg1=msk_arg1*numarray.array([[[[-0.066312470382497768, -0.89062977701329626, 0.71362735820116852, -0.8510953245363897], [0.28293774090969026, 0.25097979621619571, 0.066933085142837356, -0.56967672184500784], [0.1986033484055707, 0.76155575799023101, 0.55852074431443355, -0.71500202987886063]], [[-0.62331344986469928, -0.20106746777405515, 0.55102394367851693, -0.98232334137965815], [-0.67658601924861972, 0.92317739758478545, 0.93351836962236034, -0.20589570828355885], [0.90470062450224575, 0.66723967147848429, -0.033936107455468267, 0.55318521774224605]]], [[[0.60894484824072981, 0.13287283422764329, -0.13321078710786471, -0.82165783919443536], [0.13368845696530918, -0.59334064706858936, 0.11519758697474081, -0.35471586137804523], [0.58688784183441478, 0.56827715360873454, 0.94988912711576612, 0.024453360032851146]], [[-0.45298593929664333, -0.88380857939677937, 0.41042957905037114, -0.5833823328762251], [-0.67171125068743298, 0.39935136685719619, -0.53134853308929642, 0.93408659260593163], [0.1951446842154847, -0.84017953630497177, -0.44662380908267529, -0.65508078680812609]]], [[[0.21054665031300557, -0.16075862406915165, -0.11940924337577585, 0.71458184133956326], [-0.11249420009883448, -0.72194668061515088, 0.43551686843447701, -0.65726238063840325], [0.57020742614208064, -0.78711907270448789, 0.43212511342249726, 0.0013358666819349718]], [[-0.67954467636278171, 0.15950351051049738, -0.89383827696316875, -0.8840920624626798], [-0.95076218521268774, -0.67804964568320436, -0.81092815217985925, -0.54797049686525989], [0.61486303043574275, -0.14290653565480405, 0.69133390362967218, 0.024550324593437756]]]])+(1.-msk_arg1)*numarray.array([[[[0.63494465698856972, -0.48488631109074665, -0.94806337724031264, -0.41820750929885575], [-0.44235661868574261, -0.51810596353317306, 0.51911006914000302, -0.98759912447853693], [0.72870517333516971, -0.91489474875045085, 0.89603074496374435, 0.86497307424604974]], [[-0.035096579189960231, 0.14285616178492155, 0.70734963342151569, -0.62420641584175662], [0.95768549343851794, -0.93878301478876325, -0.50688263601359429, -0.43973229011588288], [-0.42389449784277122, -0.51673090989498061, 0.5661720369298191, -0.16556170575614515]]], [[[0.48334167705674269, -0.60079239828936437, -0.75011328001800304, -0.24713665339883883], [0.82345167794282959, 0.86168709898201046, -0.39365753159365813, 0.56891341758443326], [-0.17891976579371804, -0.28997290343372595, -0.7460995910027961, 0.14226008593460104]], [[-0.16544575140619178, 0.79101784387278862, 0.3373194453076529, 0.67183289286145609], [0.7156256283509812, -0.75593140722953955, -0.15867260258076077, 0.20469527257985543], [0.30181817583862958, 0.058883413713779031, 0.62227232187781278, -0.79758012149488478]]], [[[-0.38962504256609698, -0.047658553830109751, 0.55656226850951573, -0.028622882565748409], [0.64843964854655312, -0.5511453419056811, 0.37189718058596233, 0.50932018272054336], [0.18260360814565457, 0.35757469805554387, 0.37342919652878703, -0.082727729105125158]], [[-0.83731026720650648, 0.61874667386645266, -0.68483960244566688, 0.99026183453543593], [0.196325542135388, 0.92663897567289788, -0.34059772678603073, 0.53975735224831722], [-0.79781723482887945, 0.9180424353548009, 0.87670650811699713, -0.52528550909828664]]]])
61640          res=generalTensorProduct(arg0,arg1,offset=0)
61641          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
61642          ref=msk_ref*numarray.array([[[[-0.015291011068021282, -0.20537056905384243, 0.1645555318593129, -0.19625430861435661], [0.065242692707055364, 0.057873501313630595, 0.015434118798959243, -0.13136191441338946], [0.045796001583092889, 0.17560735495412155, 0.1287894544385062, -0.16487251778544776]], [[-0.1437300225093596, -0.046364203556554073, 0.12706076508585004, -0.22651421367309676], [-0.1560141591637898, 0.21287573397268333, 0.21526026160328704, -0.047477548884273545], [0.20861516970661428, 0.15385898222083524, -0.0078253364972523422, 0.12755913387589637]]], [[[0.14041676264742425, 0.030639183958836566, -0.030717112607884445, -0.18946631064682284], [0.030827258633736185, -0.13681858554054621, 0.026563443757707229, -0.081794029555049885], [0.13533063137918849, 0.13103918758285724, 0.21903519914640157, 0.0056387071203326195]], [[-0.10445415427127822, -0.20379766719014034, 0.094641071275169547, -0.13452229508935432], [-0.15489008491963643, 0.092086543231158738, -0.12252380666230983, 0.21539128829978585], [0.044998467241420523, -0.19373723395705592, -0.10298710888815742, -0.15105526160845531]]], [[[0.048550010905953338, -0.037069376027500059, -0.02753461078362951, 0.16477562639280335], [-0.025940069022876999, -0.16647388673852154, 0.10042595634167831, -0.15155831593914573], [0.13148428966548878, -0.18150200683447412, 0.099643850606074641, 0.00030803787132412233]], [[-0.15669639673416197, 0.03677995904142934, -0.20611041795348764, -0.20386303562948935], [-0.2192365178568349, -0.15635165719216351, -0.18699214912109585, -0.12635666993228672], [0.14178143793284981, -0.032952857973557494, 0.15941487794262285, 0.005661066205442605]]]])+(1.-msk_ref)*numarray.array([[[[0.14641206580890304, -0.11181006991375099, -0.21861419897264894, -0.096434586383713383], [-0.10200313626260925, -0.11947019884942447, 0.11970173584177202, -0.22773075797150866], [0.16803232946262528, -0.21096583566444943, 0.20661597976214455, 0.19945438279626568]], [[-0.008092929998653943, 0.032941242248830764, 0.16310794954886715, -0.14393593178343414], [0.22083296543446027, -0.21647423760273826, -0.11688220862176434, -0.10139799160465301], [-0.097745950660554942, -0.11915312484691117, 0.13055376813986105, -0.038176919975309496]]], [[[0.1114538923204, -0.1385368869359816, -0.17296883076237154, -0.056987309937902554], [0.1898799524248734, 0.19869666884228621, -0.090773600167326968, 0.13118590387073603], [-0.04125715877057131, -0.066864932798547272, -0.17204331309124399, 0.032803792952008359]], [[-0.038150182029365161, 0.18240102556718452, 0.077782585114179195, 0.15491813442252175], [0.16501631353131871, -0.17431043434120974, -0.036588359749820644, 0.047200740080048667], [0.069596337471037259, 0.013577942815683664, 0.14348994851605365, -0.1839142229970511]]], [[[-0.089843747396099391, -0.010989599239759867, 0.12833784895560513, -0.0066001584858320977], [0.14952387968170427, -0.12708875833696101, 0.085755874750321148, 0.11744428319777975], [0.042106617007481972, 0.082453249503049802, 0.086109142734502611, -0.019076210162012171]], [[-0.1930756083941913, 0.14267696835632362, -0.15791735521860295, 0.22834475302728208], [0.045270761599010431, 0.21367394023091554, -0.078538524955973951, 0.12446279862095527], [-0.18396889902696786, 0.21169166159776412, 0.20215999858997175, -0.12112573226668788]]]])
61643          self.failUnless(isinstance(res,Data),"wrong type of result.")
61644          self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
61645          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61646       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61647       def test_generalTensorProduct_array_rank1_float_rank0_offset0(self):
61648          arg0=numarray.array([-0.27625195823531112, -0.75078696241622422])
61649          arg1=0.427691913345
61650          res=generalTensorProduct(arg0,arg1,offset=0)
61651          ref=numarray.array([-0.11815072858291316, -0.32110551247013941])
61652          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61653          self.failUnlessEqual(res.shape,(2,),"wrong shape of result.")
61654          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61655       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61656       def test_generalTensorProduct_array_rank1_array_rank0_offset0(self):
61657          arg0=numarray.array([0.53938078068318251, -0.49824063116272055])
61658          arg1=numarray.array(-0.832775572875)
61659          res=generalTensorProduct(arg0,arg1,offset=0)
61660          ref=numarray.array([-0.44918313863132658, 0.41492262704625121])
61661          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61662          self.failUnlessEqual(res.shape,(2,),"wrong shape of result.")
61663          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61664       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61665       def test_generalTensorProduct_array_rank2_array_rank1_offset1(self):
61666          arg0=numarray.array([[0.88539183799797438, -0.40982751242758342, 0.59340415310638051], [0.2778157681814577, -0.15842581033003245, 0.36342429966143941]])
61667          arg1=numarray.array([0.20672442496420129, -0.34180190599784144, -0.54398285808314895])
61668          res=generalTensorProduct(arg0,arg1,offset=1)
61669          ref=numarray.array([0.00031025625101116505, -0.08611504037333928])
61670          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61671          self.failUnlessEqual(res.shape,(2,),"wrong shape of result.")
61672          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61673       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61674       def test_generalTensorProduct_array_rank3_array_rank2_offset2(self):
61675          arg0=numarray.array([[[0.41240187517243743, 0.80149388213518225, 0.6745878855975842], [-0.98079352271344677, -0.31453045490141163, -0.23603500511791431]], [[0.35323881651995603, 0.18772913395415314, 0.59815792024827741], [-0.79788231528322928, -0.74692529231152172, 0.30335981519358346]]])
61676          arg1=numarray.array([[-0.88221591813325406, 0.93087345105456332, 0.10605621958128308], [-0.33744894794646707, -0.50807432404282804, -0.69305432358433916]])
61677          res=generalTensorProduct(arg0,arg1,offset=2)
61678          ref=numarray.array([1.1081637895104819, 0.36505080704249099])
61679          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61680          self.failUnlessEqual(res.shape,(2,),"wrong shape of result.")
61681          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61682       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61683       def test_generalTensorProduct_array_rank4_array_rank3_offset3(self):
61684          arg0=numarray.array([[[[-0.57169923177964632, 0.30353363141778189, 0.26377102110166706], [0.56413783485466262, -0.76690392370295712, -0.9667075191575647], [-0.66186644532876637, -0.11993329259543017, 0.61828017839465632], [-0.49127889096237021, 0.23976236080820978, 0.42256666962081479]], [[-0.090544527580306511, 0.13413440802242604, -0.1457797722237657], [-0.031536035831397191, 0.58066610576011146, 0.62949072806729101], [-0.22234525084722767, 0.73703517301187871, 0.89236045129088493], [0.78402134351733999, 0.86083626405088864, 0.10499665521946655]]], [[[-0.56604889463766028, -0.56565123509415005, 0.50932781624734358], [0.25808680279858298, 0.017644158605391924, 0.8888513859936682], [-0.64207509069485647, 0.031789934675000353, -0.44571603689781503], [-0.52036437236378696, 0.020123607670690546, -0.74895536700886289]], [[0.01446271912075181, -0.51124159183720974, -0.59399690628094826], [0.99231918980516998, 0.91169617539924164, -0.014796197189341775], [0.41444067023573261, -0.18067184403240177, 0.60913632480383262], [-0.4307741668346976, -0.68664281942059002, -0.48116283104473023]]]])
61685          arg1=numarray.array([[[0.35362784529244751, 0.72816504699497409, -0.17615592910788802], [0.16239863539338728, -0.39673750318313439, -0.014115918626133039], [-0.37396256237417758, 0.071779395090337816, 0.10643531664487171], [0.77871767983666884, 0.58389496873888214, -0.85725801390774103]], [[0.71358517268545563, -0.82189444544790136, -0.88778623487270658], [-0.75100881454701196, 0.46903068813805393, -0.011983138755741196], [-0.024651679718989739, 0.36703157575218559, -0.16848622192977247], [0.44186275788820839, 0.85182694343056875, -0.41831469678362354]]])
61686          res=generalTensorProduct(arg0,arg1,offset=3)
61687          ref=numarray.array([1.4862950482934913, -0.348605050085871])
61688          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61689          self.failUnlessEqual(res.shape,(2,),"wrong shape of result.")
61690          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61691       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61692       def test_generalTensorProduct_array_rank1_array_rank1_offset0(self):
61693          arg0=numarray.array([-0.86119269783132357, 0.70989525090873573])
61694          arg1=numarray.array([-0.94133810017909458, 0.23299903772206854])
61695          res=generalTensorProduct(arg0,arg1,offset=0)
61696          ref=numarray.array([[0.81067349806464717, -0.20065706988797052], [-0.66825144681659099, 0.16540491034520183]])
61697          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61698          self.failUnlessEqual(res.shape,(2, 2),"wrong shape of result.")
61699          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61700       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61701       def test_generalTensorProduct_array_rank2_array_rank2_offset1(self):
61702          arg0=numarray.array([[-0.55121571333120323, 0.96947139195929588, -0.29668652541182272], [-0.48483467722216389, -0.68798570197690379, 0.086192052612611647]])
61703          arg1=numarray.array([[-0.039211707293509868, 0.727938931848223], [0.37579996279226902, 0.30903452193668368], [0.57623481940432675, -0.35460484107182633]])
61704          res=generalTensorProduct(arg0,arg1,offset=1)
61705          ref=numarray.array([[0.21498031584282018, 0.0035552287569717012], [-0.18986694388423817, -0.59610548868813584]])
61706          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61707          self.failUnlessEqual(res.shape,(2, 2),"wrong shape of result.")
61708          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61709       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61710       def test_generalTensorProduct_array_rank3_array_rank3_offset2(self):
61711          arg0=numarray.array([[[-0.1167849162299901, -0.12587612894959044, -0.93701822746438213], [0.80741578523027324, 0.84714030734228074, 0.29496940505371971]], [[0.90392589500660381, -0.6397391043368359, -0.17587324514101499], [0.82339662710377781, 0.067099746735601595, 0.31459211686975563]]])
61712          arg1=numarray.array([[[-0.8027362920122334, 0.65782392850876259], [0.30355767269824918, 0.68172162124158708], [0.22426878281267215, -0.73047874315358796]], [[0.90693084036385807, 0.12367868713529018], [-0.27543085519071697, -0.83829683025419111], [0.94140892842895818, -0.22220054899303565]]])
61713          res=generalTensorProduct(arg0,arg1,offset=2)
61714          ref=numarray.array([[0.62202141735356897, -0.15400176785301534], [0.065187568504999405, 0.26265633877401284]])
61715          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61716          self.failUnlessEqual(res.shape,(2, 2),"wrong shape of result.")
61717          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61718       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61719       def test_generalTensorProduct_array_rank4_array_rank4_offset3(self):
61720          arg0=numarray.array([[[[0.14718802616207727, -0.72418403744145765, 0.029787271532923709], [-0.4194914416843798, 0.033539699792270783, -0.41345755052795585], [0.29793467417858288, -0.024086341810864775, 0.20107547406029402], [-0.32926862780565025, -0.087885591522340212, -0.96049633447200877]], [[0.48755603515508228, 0.58360455947452583, 0.96051393888586056], [-0.09339097647682526, -0.7289505467954871, 0.50694871812914433], [-0.23153994242379516, -0.69178924344132864, -0.35010591080392217], [0.76117083899516769, 0.91906409624905328, -0.068145540073345945]]], [[[0.28888775893902707, 0.56072260710203503, 0.3004380109898086], [-0.77690231820952871, -0.19105902948192943, 0.061097601125626344], [0.49902935768302692, -0.2575791504356848, 0.34552364335407915], [-0.76979488857722389, -0.089599824812399254, 0.18209335158166828]], [[-0.0022515113036907231, 0.95159538282261225, -0.53265411615683833], [-0.77182961005442197, 0.25080041087390881, -0.8898487749784727], [-0.78690292782915039, -0.11261393265289898, -0.95298748093132546], [0.52841967991646666, -0.41384006986314237, 0.30463914538153691]]]])
61721          arg1=numarray.array([[[[-0.14609311274113113, -0.073722987046462407], [-0.78742135171642258, -0.48291552383766301], [0.81207326183018891, 0.42985929476124451]], [[0.85045298915616385, 0.23020552261700811], [0.88744870021567324, -0.75314953189505118], [0.13110082004798085, 0.10264629590578944]], [[0.56749603335850285, 0.97712891214284459], [0.21204273490462522, 0.13016206253703966], [-0.28810992515358103, 0.22154260349347887]], [[-0.47127258934981042, -0.92833308834208794], [-0.53100947916267249, 0.86920042049278767], [-0.63104371922734082, 0.7329136152644169]]], [[[-0.61161254251146913, 0.54367778091596342], [0.5116880975065683, -0.48461481818601149], [0.080267075199626836, -0.35821005714133203]], [[-0.52631555752873749, 0.9354736941695847], [0.077835296819701805, -0.19328874304048815], [0.95185455107436723, -0.31423264712043197]], [[-0.56560635419659167, -0.60637112174268637], [-0.085211102592329002, 0.79595540543851939], [0.20174594705332338, -0.52497571340199878]], [[0.60148618323817704, 0.3731951934078912], [0.92174719978809905, 0.38607719889902881], [-0.73169489496198992, 0.7088746633475238]]]])
61722          res=generalTensorProduct(arg0,arg1,offset=3)
61723          ref=numarray.array([[3.1323213977016477, -0.058175766091763288], [-0.6373593664946231, 1.4879611045290597]])
61724          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61725          self.failUnlessEqual(res.shape,(2, 2),"wrong shape of result.")
61726          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61727       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61728       def test_generalTensorProduct_array_rank1_array_rank2_offset0(self):
61729          arg0=numarray.array([-0.2829757697975257, -0.9280442578646535])
61730          arg1=numarray.array([[0.45705394095659591, 0.64164022405665966, 0.56271284330506521, 0.037291411324969603, -0.033294294288899628], [-0.86552957408790854, -0.38831505443909253, -0.27081057004302544, -0.58214120847120077, 0.26580142569351506], [-0.9404040393213684, -0.51017277509298808, 0.2411135895592369, 0.4822196083653203, 0.81444259978873679], [-0.16124737486506158, -0.54199546950110533, 0.69075909128233892, -0.52795776423665997, 0.47484827191606827]])
61731          res=generalTensorProduct(arg0,arg1,offset=0)
61732          ref=numarray.array([[[-0.12933519078118558, -0.18156863633549014, -0.15923410000920529, -0.010552565826519441, 0.0094214785562667363], [0.24492389751005048, 0.1098837514538703, 0.076632829527231883, 0.16473185659799994, -0.075215363048902251], [0.26611155694766686, 0.14436653376167824, -0.06822930361416972, -0.13645646488863789, -0.23046752163111595], [0.045629100030271, 0.15337158520884664, -0.19546808560025919, 0.14939925475544943, -0.13437055528247421]], [[-0.42416628543917922, -0.59547052555077273, -0.52222242305595834, -0.034608080147806954, 0.030898578634469227], [0.80324975124432274, 0.36037355651460018, 0.25132419449748333, 0.5402528057880881, -0.24667548684710502], [0.87273656876492178, 0.47346291444392291, -0.22376408228358466, -0.44752113857317755, -0.75583877809429723], [0.14964470033926966, 0.50299578325915772, -0.64105500823238071, 0.4899681714948928, -0.44068021210866076]]])
61733          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61734          self.failUnlessEqual(res.shape,(2, 4, 5),"wrong shape of result.")
61735          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61736       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61737       def test_generalTensorProduct_array_rank2_array_rank3_offset1(self):
61738          arg0=numarray.array([[0.88719262810266786, -0.85937267417991481, 0.73515009090045735], [-0.23577510922465361, 0.6157923906886702, -0.93175714362701467]])
61739          arg1=numarray.array([[[0.11853687352620845, 0.54474769893396746, -0.53408456582157404, -0.52080414425198729, 0.66924101532374536], [-0.7007414023151477, -0.66438231939808712, -0.14904956236780054, -0.22947865919670796, 0.99846052869418722], [0.33888881644046331, -0.00031577792383874481, 0.87596962843829895, 0.71952174391961088, 0.16633546339573657], [0.52175818312352318, -0.46494510236282216, -0.9610286498729097, 0.74410717847739982, 0.23958643790713152]], [[-0.13232126826929247, -0.59982716495887822, -0.78356723297672159, -0.27983244591080836, -0.79720067865560185], [0.49259242892666433, -0.41266595101286963, -0.32380592655236651, 0.31683917808299467, -0.71950642541440679], [-0.10069242888550201, -0.4370528481118563, -0.65981149099369074, -0.91018898826121619, -0.9931329895944192], [-0.56133196761047066, 0.80424266626351737, 0.47938410014283361, 0.1268699672527942, 0.49718987423226135]], [[0.98288504853562686, -0.68950422210454088, 0.97574404646092594, 0.66361095476121168, -0.17518517341335893], [-0.05203293377551188, 0.15818470879819646, -0.70472708899718461, -0.64661206715994402, 0.86275555828532147], [-0.73383007291520341, 0.83314154990625688, -0.43955888677422705, -0.73076003813304724, 0.7599995212761459], [-0.58020266746887739, 0.31973218337920595, 0.85968617253301116, -0.66097830149569581, -0.78009107511971387]]])
61740          res=generalTensorProduct(arg0,arg1,offset=1)
61741          ref=numarray.array([[[0.94144635528991671, 0.49188212591017311, 0.91685870327397678, 0.26628041361424026, 1.1500507781342357], [-1.0832650952626968, -0.11851175109475108, -0.3720458914743241, -0.95123162645031867, 2.1384058085053144], [-0.15228326323567903, 0.98779520514021946, 1.0210360066939999, 0.88332762335627546, 1.5597566671512508], [0.51875732409708197, -0.86858889441017495, -0.63258876177827517, 0.065219561804482629, -0.78819609507446242]], [[-1.0252406397665506, 0.14464353238082384, -1.2657473784597557, -0.66785028455191275, -0.48547044846810294], [0.51703410786218496, -0.24486147104229458, 0.49237945069691097, 0.85169792360410035, -1.4823573766674358], [0.5418442334281578, -1.0453449563992463, -0.20327659746875576, -0.049241885014419506, -1.3589164830863569], [0.071926433245943444, 0.30695625053426601, -0.27923101655810034, 0.51855486336189893, 0.97653265463585537]]])
61742          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61743          self.failUnlessEqual(res.shape,(2, 4, 5),"wrong shape of result.")
61744          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61745       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61746       def test_generalTensorProduct_array_rank3_array_rank4_offset2(self):
61747          arg0=numarray.array([[[-0.72636443734631384, -0.10129037220852277, -0.76103264008177463], [-0.62211664895623797, 0.74055294283976392, 0.22378684113861991]], [[-0.49449308446778195, -0.4800922502304803, -0.8142076213634839], [-0.59421856346920943, 0.25373138063886547, 0.76836625176738882]]])
61748          arg1=numarray.array([[[[-0.28606000983853774, 0.832293463867112, -0.38210008231366821, -0.80872241224790686, -0.39386402809701671], [0.30915525779939879, -0.80432806932912326, 0.71662557187266707, -0.18927788789830635, -0.56917166246185658], [0.91439609030448343, -0.81399455811778654, 0.80159942642177273, -0.015384705908555452, -0.32681502176368071], [-0.70482385685773052, -0.35840875893840796, 0.034817809865170579, 0.95873063151322313, -0.45393884246224037]], [[0.068381781039508871, -0.032444353356714917, 0.88047026038742282, 0.22437347832417087, 0.74799582435792367], [-0.36498208826738421, -0.82439193967280011, -0.57587169823019679, -0.20792327665099952, 0.60649948098650142], [0.72884784989216556, -0.49664028336757737, 0.46297465888271927, -0.48328890206807484, -0.95834051384511065], [-0.18321846831087374, 0.52746329346511023, -0.21258913004052338, 0.1809080486285688, 0.018078632568951702]], [[-0.34336791527801358, 0.48326169169677491, -0.5666636980183799, -0.40668718209236299, -0.14926019819729652], [0.49782511192504875, -0.93537622095049033, -0.30683351992535224, -0.91873643616826173, 0.086549161284091625], [0.68097091087599293, -0.25587578765688312, 0.87844892869387525, -0.63531327186546838, 0.386605125189879], [0.44733965756998928, 0.618511744553087, -0.91401605492061178, 0.40652578475023349, 0.81411805308364493]]], [[[0.67850191422639705, -0.22623127604774629, 0.73517777781004767, -0.2199460295329263, -0.47532216530712423], [-0.39117756210063814, -0.44873732822108625, -0.39516810539570035, -0.29173394873203273, 0.36245659725894019], [0.21962464991068931, -0.98737107742219066, -0.894818366933674, -0.42809625337109503, -0.53142888685762801], [-0.18578339421834866, 0.18355841816478269, 0.271135090145038, 0.97382421304952382, 0.71306276049109618]], [[-0.10029831084213314, 0.52632836745412548, 0.40666636090434349, 0.046623171281902298, 0.67834313251900324], [-0.3268832248099538, -0.70725487874989201, -0.18859846728163676, -0.40278228695924856, 0.25019540844372523], [-0.010096473713268717, -0.82595056670808864, 0.14958822238207259, -0.3532399500190746, -0.62779542812365352], [0.16216320785059857, -0.15616923957404261, 0.014607249734463812, 0.52325164343339559, 0.6357234988098468]], [[0.98409545719298719, -0.83481648471335879, 0.97778669770809423, -0.87561525778350857, -0.75916117663142257], [0.12180598143746568, 0.39015872113454875, -0.058869046220418886, 0.45713098128261231, -0.57234648655361631], [0.11102136377660909, -0.50158013728182493, -0.62414895107162982, -0.016758991639415077, 0.45023237632991209], [0.040805237233795033, 0.19005641883988966, -0.63160760683823813, -0.81837258747001695, -0.70118744722329862]]]])
61749          res=generalTensorProduct(arg0,arg1,offset=2)
61750          ref=numarray.array([[[0.18601566042244522, -0.62534467332599475, 0.68221775223882553, 0.84961038763323604, 0.95208048445738391], [-0.5379090567407564, 1.2223097756787735, -0.1356913582606423, 0.84324460511297528, 0.11783580954184175], [-1.3755151660203135, 0.72664423322593952, -0.76989341925204946, 0.54460403285559389, 0.0066894453864743686], [0.43487822903103707, -0.45111341500763735, 0.39263318149902787, -1.4255691984654943, -0.42141440184002543]], [[0.71571638318121789, -1.1629303980766468, 0.64524683551769635, 0.093048036895923114, -0.17156680338673058], [-0.13988702271998471, 1.9420893851102949, 0.31366122645442046, 1.3638604095421463, -0.67186097308278425], [-1.4042902200484617, 0.84103124297567078, -1.243797810704689, 0.90878543199006789, 0.80935965497641593], [0.25516013461902143, -0.58226328124053195, 0.18633091000231633, -1.9666435521494512, -1.2482518152866606]]])
61751          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61752          self.failUnlessEqual(res.shape,(2, 4, 5),"wrong shape of result.")
61753          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61754       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61755       def test_generalTensorProduct_array_rank1_array_rank3_offset0(self):
61756          arg0=numarray.array([-0.10853748989477352, 0.27834309849207006])
61757          arg1=numarray.array([[[-0.36996470997559849, 0.62604099130254198], [-0.72837431218177939, 0.15795724318798321]], [[-0.81627257263074759, -0.75179644840510051], [0.19004534005575913, -0.7187506521753273]], [[-0.5509004522495915, 0.22283216225380054], [-0.77273613271687114, -0.16415059713725833]], [[-0.50917795307069347, 0.20972370103547666], [-0.70561560257966605, -0.8506773758558186]], [[-0.74448550124953772, -0.054835132199751779], [-0.33766244205511864, 0.50694644628308283]], [[0.26345238610895128, -0.33914884332376483], [0.66325736581644645, 0.93041865540431035]]])
61758          res=generalTensorProduct(arg0,arg1,offset=0)
61759          ref=numarray.array([[[[0.04015504097039934, -0.067948917767213651], [0.079055919548042489, -0.01714428268632201]], [[0.088596176103290555, 0.081598099421695214], [-0.020627044175850755, 0.078011391647341458]], [[0.059793352269066201, -0.024185643558852409], [0.083870840196083776, 0.017816493778006214]], [[0.055264896936051855, -0.022762884081832552], [0.076585746334585036, 0.092330387085663365]], [[0.080804587568677103, 0.0059516676070091286], [0.03664903389240199, -0.055022694790641452]], [[-0.02859446069505427, 0.036810364155077255], [-0.071988289639936656, -0.1009853054088541]]], [[[-0.10297712370732814, 0.17425418930219663], [-0.2027379629147068, 0.043966308498208671]], [[-0.22720383708013558, -0.20925735288440936], [0.05289780880509911, -0.20005928356967673]], [[-0.153339338839834, 0.062023794485410538], [-0.21508576949719338, -0.045690185826508009]], [[-0.14172616914154665, 0.058375144773439136], [-0.19640323316637334, -0.23678017661281181]], [[-0.20722240120021823, -0.015262980602701192], [-0.093986010366020792, 0.14110504462797702]], [[0.073330153454694694, -0.094399739900738314], [0.1846131102990381, 0.25897561144006137]]]])
61760          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61761          self.failUnlessEqual(res.shape,(2, 6, 2, 2),"wrong shape of result.")
61762          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61763       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61764       def test_generalTensorProduct_array_rank2_array_rank4_offset1(self):
61765          arg0=numarray.array([[0.0078035188859546523, -0.85228540660692742, -0.67849544792883698], [0.15092314754829839, 0.49233214806070325, 0.093137282528565013]])
61766          arg1=numarray.array([[[[0.12017388805777252, -0.9430103459798842], [-0.11371451892203477, 0.33651740736939484]], [[-0.31085031016254461, 0.45867044866512363], [-0.27603052372300985, -0.45076616037594608]], [[-0.53981957899116306, -0.070306842819090054], [-0.93860389517573894, 0.93558901853748089]], [[0.74802844573897365, 0.21899443386586781], [0.10732264201234232, -0.88588929307979591]], [[-0.88513743469563178, 0.84934293267765337], [-0.45868453965338651, -0.46782169518892003]], [[-0.28151973413459364, 0.83937657538757215], [0.8744249127243684, 0.41248182962656021]]], [[[-0.78059611961578512, -0.27495714631707369], [-0.28073381516961171, 0.63439512465272574]], [[-0.70273359478204123, -0.20009279507917022], [0.79041542048899904, 0.40387131731046799]], [[0.35335763910871743, -0.60224707362059449], [0.3215895116059011, -0.2773709016734498]], [[0.8915661743100054, 0.30571625591704499], [-0.26765471155147158, 0.88603898280079973]], [[0.28706896949318694, 0.54508954862981263], [0.11544939039138713, 0.93434253933909317]], [[0.92040563974618106, -0.59609466028016689], [0.87108811986402657, -0.23697208153249405]]], [[[-0.19400020083227232, 0.62402764134768107], [0.97615688977960691, -0.75384608289350585]], [[0.43789672240272903, 0.067928551485255895], [-0.66393561207634377, -0.66258699148069744]], [[0.76171005082854171, -0.27870818368788752], [-0.48965968030894991, -0.17532778704823038]], [[-0.91655276916487183, 0.36645953003278242], [-0.86949795886079762, 0.45242880832025656]], [[-0.60608808008351045, -0.65272896582654027], [0.96491445117502761, 0.082306837257531962]], [[0.074935959463451995, 0.8831193228565084], [0.77611002584106381, -0.85829091056151174]]]])
61767          res=generalTensorProduct(arg0,arg1,offset=1)
61768          ref=numarray.array([[[[0.79785671356956356, -0.19641674983234755], [-0.42394004576570354, -0.026578551138012774]], [[0.29939292848589227, 0.12802619975460902], [-0.22533624693317911, 0.10183106544004572]], [[-0.8221908535339113, 0.70183998517555579], [0.050821403241918972, 0.36265916369699608]], [[-0.13215470362029469, -0.50748969925739873], [0.81890610599920599, -1.0690420355125436]], [[0.15965612330354495, -0.015070371930739235], [-0.75666524686313408, -0.85582198089708916]], [[-0.83748884685860336, -0.084599569664572716], [-1.2621792207330758, 0.78753313242569789]]], [[[-0.3842441944150069, -0.21957209331898697], [-0.064459835337776841, 0.29291020515899158]], [[-0.35210833670680258, -0.022961447121428859], [0.28565036768724084, 0.069096233634080129]], [[0.1634416597353755, -0.33307464827850231], [-0.028933771106071385, -0.01168612597854285]], [[0.46647626300884848, 0.2176963150112573], [-0.19656022519343067, 0.34466226492148422]], [[-0.048703842016871397, 0.33575721500520422], [0.077482841762442745, 0.39706758184370278]], [[0.41763677295896673, -0.08454387592812411], [0.63312042407583446, -0.13435480092625432]]]])
61769          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
61770          self.failUnlessEqual(res.shape,(2, 6, 2, 2),"wrong shape of result.")
61771          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61772       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61773       def test_generalTensorProduct_array_rank1_Symbol_rank0_offset0(self):
61774          arg0=numarray.array([-0.36050666921258179, -0.043413969575951894])
61775          arg1=Symbol(shape=())
61776          res=generalTensorProduct(arg0,arg1,offset=0)
61777          s1=numarray.array(-0.0160703058462)
61778          sub=res.substitute({arg1:s1})
61779          ref=numarray.array([0.0057934524338569549, 0.00069767576908508482])
61780          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61781          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61782          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61783       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61784       def test_generalTensorProduct_array_rank2_Symbol_rank1_offset1(self):
61785          arg0=numarray.array([[0.77607716220803979, -0.99594136800213739, -0.96448610306306004], [0.48337776457661419, -0.90884666590234664, 0.90716223281288966]])
61786          arg1=Symbol(shape=(3,))
61787          res=generalTensorProduct(arg0,arg1,offset=1)
61788          s1=numarray.array([-0.28627301517467196, 0.95051276753062108, -0.26521491840056299])
61789          sub=res.substitute({arg1:s1})
61790          ref=numarray.array([-0.91302883210909636, -1.2428413273531005])
61791          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61792          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61793          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61794       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61795       def test_generalTensorProduct_array_rank3_Symbol_rank2_offset2(self):
61796          arg0=numarray.array([[[-0.3881169801829274, 0.05361978882711238, 0.5448622547455988], [0.34926995995569254, 0.086923411592937372, -0.19794789502097365]], [[0.44952854021527178, 0.77905611042987455, 0.79819507062100992], [0.70478139709467924, -0.44768631083572896, 0.5091822530048038]]])
61797          arg1=Symbol(shape=(2, 3))
61798          res=generalTensorProduct(arg0,arg1,offset=2)
61799          s1=numarray.array([[0.08210650131697439, 0.85672069216400626, 0.1044751096001153], [0.33964493465944301, 0.97118542067270508, 0.24346151848231123]])
61800          sub=res.substitute({arg1:s1})
61801          ref=numarray.array([0.22584862671430195, 0.71628952127448364])
61802          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61803          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61804          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61805       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61806       def test_generalTensorProduct_array_rank4_Symbol_rank3_offset3(self):
61807          arg0=numarray.array([[[[0.73192744062979243, -0.86582803721633539, -0.87971118172580276], [0.54750427933408163, -0.54141522183025526, -0.84534683573538461], [0.03819877816900874, 0.77759426741854232, 0.83410456877607375], [0.70712858470186957, -0.69734276344252133, 0.66822470002225121]], [[0.71328917527041313, 0.64023236437544351, -0.14705496155296638], [0.90935149665240966, -0.45890279060498673, 0.86259228397823429], [0.11140118901071294, 0.7028227149084274, -0.26309487192456693], [0.84744107056898921, -0.59558372704546914, 0.59828814507495576]]], [[[0.23023526314517118, 0.67616478193830432, -0.11411485977424118], [-0.88110485368181979, -0.17740215780947932, 0.32358390013819904], [0.2881550640356163, -0.67419791717423561, 0.69520283987235088], [0.48861990708641101, 0.41270780164177623, 0.051761663475380137]], [[0.50873730837208297, -0.36858725740218801, -0.70655675098741777], [0.81852223427954285, -0.31038441654285576, 0.33325073548517214], [0.73395871732042783, -0.58514627141120101, 0.12206787241674699], [-0.84356956318849985, -0.67320547235325523, -0.41902422734050537]]]])
61808          arg1=Symbol(shape=(2, 4, 3))
61809          res=generalTensorProduct(arg0,arg1,offset=3)
61810          s1=numarray.array([[[-0.33524944467286422, 0.9420911586348315, 0.6105407835372203], [-0.60096237501766936, -0.67245625834347367, -0.11149464195140535], [-0.013777203995165133, -0.27260636597032439, -0.84347872128715706], [-0.60576434452169958, 0.74700267642542539, 0.13311803236228914]], [[0.80285236710981978, 0.69086199290892214, 0.93976213654597962], [0.60002393599705561, 0.97726566807739612, 0.18819884215916871], [0.30122524991759403, -0.10033862900821822, -0.086243008718718261], [-0.14417860339664124, 0.50737153763203358, -0.74136467010984619]]])
61811          sub=res.substitute({arg1:s1})
61812          ref=numarray.array([-2.9911419496760034, 0.81581298487748888])
61813          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61814          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61815          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61816       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61817       def test_generalTensorProduct_array_rank1_Symbol_rank1_offset0(self):
61818          arg0=numarray.array([0.15159051577085525, 0.075625057793151873])
61819          arg1=Symbol(shape=(2,))
61820          res=generalTensorProduct(arg0,arg1,offset=0)
61821          s1=numarray.array([-0.52448466453461906, 0.63688849231133648])
61822          sub=res.substitute({arg1:s1})
61823          ref=numarray.array([[-0.079506900810706896, 0.09654625503799788], [-0.039664183067052439, 0.048164729038838186]])
61824          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61825          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
61826          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61827       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61828       def test_generalTensorProduct_array_rank2_Symbol_rank2_offset1(self):
61829          arg0=numarray.array([[0.24388178473861255, 0.15637170047183457, 0.28365657045737191], [-0.44590736256655195, 0.81338818922856326, 0.53028641533895837]])
61830          arg1=Symbol(shape=(3, 2))
61831          res=generalTensorProduct(arg0,arg1,offset=1)
61832          s1=numarray.array([[-0.025834489874195121, 0.03199833701523791], [0.36562987923660306, -0.053737830634191575], [0.93443335628854807, 0.13250150309657216]])
61833          sub=res.substitute({arg1:s1})
61834          ref=numarray.array([[0.31593176562698988, 0.036985657532828349], [0.80443612952257926, 0.012285736286508434]])
61835          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61836          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
61837          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61838       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61839       def test_generalTensorProduct_array_rank3_Symbol_rank3_offset2(self):
61840          arg0=numarray.array([[[0.064078202130272155, -0.99302284160511323, -0.27372380942215546], [0.88391054150784543, 0.6304471642230598, 0.76637926003644274]], [[-0.58153743482590503, 0.79113273313454791, -0.097764019201349805], [0.17489461126850347, 0.11879015893611888, 0.87219750072608382]]])
61841          arg1=Symbol(shape=(2, 3, 2))
61842          res=generalTensorProduct(arg0,arg1,offset=2)
61843          s1=numarray.array([[[0.11028483760072705, 0.033713991610237803], [-0.5807297681894219, 0.039799623183904398], [0.76478362448577597, 0.7244965571945956]], [[-0.77969163746748671, 0.96720764292030714], [0.60814465453198974, 0.14620100114769374], [0.077439052024411925, 0.31696227584510517]]])
61844          sub=res.substitute({arg1:s1})
61845          ref=numarray.array([[0.12797839044236509, 0.95433679191757426], [-0.59491752926979713, 0.40403149084354251]])
61846          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61847          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
61848          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61849       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61850       def test_generalTensorProduct_array_rank4_Symbol_rank4_offset3(self):
61851          arg0=numarray.array([[[[-0.42005963492323728, -0.9007456008462682, 0.42161579826074091], [-0.82153892788275407, -0.99529965765589079, 0.033330297420224975], [-0.70096343357085544, -0.068516846758202465, 0.03814510132717186], [0.57049015225187749, 0.61951324369546579, -0.70620466120093894]], [[-0.61257454090493391, 0.5277635448974618, 0.16861908846682683], [-0.15447992986624715, 0.57248646084057819, -0.35360619315136876], [-0.46138000821736824, 0.059921678117514698, -0.79538111200767792], [-0.30128545557052977, -0.11021891016544005, -0.90286877390620757]]], [[[-0.15266779302281108, -0.2142191675670313, 0.33761558983992179], [-0.19601232400027091, 0.85132449076736672, 0.27141423309734325], [0.93096214681939427, 0.59419093255579214, -0.19557355195982074], [-0.057223657932959471, -0.25453747255791881, 0.011678231838159192]], [[-0.93388060767728787, -0.63049353969801381, 0.70285275093593014], [-0.0031868118712472526, 0.60326713359319473, 0.69346584651570042], [-0.76049149745121891, -0.1715451297949131, -0.35328050048268778], [-0.32079283214381094, -0.7278874369059487, -0.97894250777367731]]]])
61852          arg1=Symbol(shape=(2, 4, 3, 2))
61853          res=generalTensorProduct(arg0,arg1,offset=3)
61854          s1=numarray.array([[[[0.35008581452873577, -0.99912196201850034], [0.035547935028381161, -0.20229740970315091], [0.83089724304795087, -0.69746689768166248]], [[-0.78770064942450602, 0.40829784339208963], [0.22674182795919062, -0.44595084634020443], [0.34973059288337049, -0.0008103521557407678]], [[0.30535869540823768, -0.059065103260578677], [-0.41340990729768379, 0.92801324162197529], [-0.95652041369480356, 0.1687591036083631]], [[0.32777445698133412, 0.24086392624204223], [0.69758789069007854, 0.83624319705158601], [-0.50691337111318258, -0.37290605901159135]]], [[[-0.65786437350857496, -0.33383309265474481], [0.16865005904383712, -0.59177263076880648], [-0.77833745021222844, 0.68050282738571766]], [[-0.87009262656589281, 0.086514350285726183], [0.038310262639874137, -0.65069560929077985], [0.48054633727017326, -0.33187776032745586]], [[-0.7334501645319651, 0.84760510285286106], [0.96084381792898288, 0.9922390556084808], [-0.31487263145060984, 0.51810826129150178]], [[-0.037218407224753447, -0.368304876329693], [0.23953018615666011, 0.89096534999027099], [0.44204289964372467, 0.88797831940553906]]]])
61855          sub=res.substitute({arg1:s1})
61856          ref=numarray.array([[1.9385852650867614, -0.47494800748598132], [0.9144289552774485, -2.1243775217119816]])
61857          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61858          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
61859          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61860       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61861       def test_generalTensorProduct_array_rank1_Symbol_rank2_offset0(self):
61862          arg0=numarray.array([0.30166435952651804, -0.42256409011527007])
61863          arg1=Symbol(shape=(4, 5))
61864          res=generalTensorProduct(arg0,arg1,offset=0)
61865          s1=numarray.array([[-0.44001636458534943, -0.45114879804009633, 0.83878606589502214, -0.96143602668854244, 0.080872377350810654], [-0.60785779746210467, -0.0449823181821567, -0.65273232868951747, 0.11409184313954901, 0.46297658093504457], [-0.91978923691294723, 0.69979192135998303, -0.18078194954433657, 0.7728287080922327, -0.12621337066155514], [0.68833504194966277, -0.42015248011705331, -0.65923303968353553, 0.62907069422793915, -0.26119502968350017]])
61866          sub=res.substitute({arg1:s1})
61867          ref=numarray.array([[[-0.13273725480382628, -0.13609551321192409, 0.25303186134798961, -0.29003098321671944, 0.024396313916919179], [-0.18336903315460573, -0.013569562204438348, -0.19690607987637596, 0.034417442787892015, 0.13966353376354737], [-0.27746763105272898, 0.21110228175889076, -0.054535471023247593, 0.23313487725034976, -0.038074075624301054], [0.20764614956940394, -0.12674502881798899, -0.19886711269485341, 0.18976820807117334, -0.078793231340982942]], [[0.18593511473683713, 0.19063928135041106, -0.35444087073629699, 0.40626833982168448, -0.034173762550704083], [0.25685887710404637, 0.019007912353918615, 0.27582124256150736, -0.048211115885837645, -0.19563727766749581], [0.38866990199393814, -0.29570693651949786, 0.07639196001846725, -0.32656965984995395, 0.053333238133981366], [-0.29086567069591551, 0.17754135047033673, 0.27856820958779693, -0.26582268552461041, 0.1103716400608392]]])
61868          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61869          self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
61870          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61871       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61872       def test_generalTensorProduct_array_rank2_Symbol_rank3_offset1(self):
61873          arg0=numarray.array([[-0.72102873213880825, 0.94977404572871227, -0.67687789450781666], [-0.83767281947448824, -0.82821901004659848, 0.63145092311017903]])
61874          arg1=Symbol(shape=(3, 4, 5))
61875          res=generalTensorProduct(arg0,arg1,offset=1)
61876          s1=numarray.array([[[-0.30242828441914971, -0.32731094472714828, 0.98230310556817613, 0.2099787488995295, 0.079260668211424967], [-0.73794718476139143, -0.56383105576665415, 0.5211608863377406, 0.69849852241861177, 0.0146651968512308], [-0.56597199228220973, -0.48209278883088835, 0.51977413303718878, 0.23992364478232209, 0.61386672439545009], [0.15413549975179341, -0.15994699336384466, -0.70852529564663747, 0.13051758868830832, -0.23782729861494278]], [[0.20431148139689781, 0.048439944501679655, 0.73968742238549323, -0.85772080352828795, -0.6978192142942401], [-0.46523221253903557, -0.018207225874345978, -0.46203628667833585, -0.86997191695419418, 0.26329401159807309], [0.44290712696677104, 0.18933118629564594, 0.04453242243154576, -0.11422298677516807, -0.90314201705479968], [0.81473704734540653, 0.42679708784266923, 0.28909998892473787, 0.80187777330096743, -0.74087324922573727]], [[-0.94013674165037964, 0.81266229817903479, -0.75582956331525075, 0.73115116639598488, -0.80417022948133599], [-0.42514416334057681, -0.039815698039989522, -0.11707779993120626, -0.093488413307347695, 0.12326762912522526], [0.25063378986803819, -0.55644921068977293, 0.30347580434817867, 0.83841022432806778, 0.29308278247394992], [0.86666009452253667, -0.59470758069476748, -0.17322072295475199, -0.75830562515565236, -0.40599179224561865]]])
61877          sub=res.substitute({arg1:s1})
61878          ref=numarray.array([[[1.0484670029905607, -0.2680655477813027, 0.50587147637346619, -1.4609417308449135, -0.17559474569923572], [0.37798632845164598, 0.41619600655740935, -0.73535467167735058, -1.2666340108959169, 0.15605865705618246], [0.65909528990423538, 0.90407276922685975, -0.53789240860470455, -0.84897921704919677, -1.4987776501162411], [0.076056917664334978, 0.92323158972862351, 0.90269603994827785, 1.1807760803830374, -0.25737499817830578]], [[-0.50952891253039923, 0.74721695739454641, -1.9127410722012519, 0.99617326312800591, 0.003758597696460364], [0.73501478699689271, 0.46224386149904867, -0.12782395794228985, 0.076380708271951023, -0.15251228423074592], [0.26553819025440512, -0.10434202977042631, -0.28065318553513996, 0.4230390431450628, 0.41884731103158451], [-0.25664251274988459, -0.59502686349659983, 0.24469389002999442, -1.2522942390934229, 0.55646288083387518]]])
61879          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61880          self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
61881          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61882       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61883       def test_generalTensorProduct_array_rank3_Symbol_rank4_offset2(self):
61884          arg0=numarray.array([[[-0.38858753557231474, 0.41498100943681382, -0.28971306152118714], [0.9787844616733623, 0.51900814617439495, 0.91051187071162687]], [[-0.049561078656026769, 0.27607458696591514, -0.38660575841083222], [0.39018619328681381, -0.62427006323061884, 0.31134669138106541]]])
61885          arg1=Symbol(shape=(2, 3, 4, 5))
61886          res=generalTensorProduct(arg0,arg1,offset=2)
61887          s1=numarray.array([[[[0.5093026400610714, -0.83214475895564122, 0.72602261260621259, 0.0054702335931500201, -0.51078198879764458], [-0.11668222722560895, 0.8757201690267693, 0.4957001740409257, 0.35735016661497943, 0.91560902101890518], [0.60856031560715151, 0.41503063459296663, 0.83332473258952833, 0.34886257004723253, 0.53302865479772699], [0.60882330356442615, 0.82868421868866715, 0.57078708604696993, 0.96369095024404983, 0.95720655954869716]], [[0.33019589049297515, -0.22293452449359519, -0.21493054665900169, 0.83560129017168649, 0.34767319542466057], [-0.27535207288636587, 0.4575561291751451, 0.66715681084182932, 0.57676892927807755, -0.082949513506240136], [-0.9678866432382367, 0.27897822693992858, -0.60128585356123243, -0.40282913167735868, 0.42683488272026437], [0.13938862766976667, 0.048824101751917759, 0.6966877198824315, -0.1012728111974599, 0.27536194584482399]], [[-0.90144686591292023, 0.60159495203114055, -0.5878188709089196, 0.87071777587505461, 0.85200313559265584], [0.87004526660512926, -0.36037145392379677, 0.51697490269672741, -0.92764663657328139, -0.16602639357305971], [0.12584549195682371, 0.37100517807161149, 0.86000160490410038, 0.72939843339536536, 0.087172647105981493], [0.24966508692146405, 0.81572792334432354, -0.53729230054451649, 0.98069086437275232, -0.75057802227508996]]], [[[0.4449251606438811, 0.92801169290252239, 0.22441865267098415, 0.86831696841660322, 0.85164460704295775], [-0.35948280925940046, -0.27171710741652544, 0.35988923108486248, -0.39836450417754898, 0.17567380775652719], [0.66261189939895382, 0.88252937703079937, -0.61535552514634739, 0.89658059782272925, 0.74777293915723053], [0.97356214743608183, -0.01408805257582002, -0.48263748142297502, -0.26423156710700169, -0.34626573623508849]], [[0.34223014823132991, -0.14088365767318223, -0.57861449457363645, -0.062250758877663959, -0.60163476302236618], [-0.46120030883029939, 0.89297621972730146, -0.46801484476799304, 0.62850380002260997, 0.93279525472409142], [-0.77614425968051437, -0.8380614554616892, -0.38984415011304674, -0.56233143365452354, -0.39181869970672834], [-0.87445987980262618, 0.54507182675009536, 0.52673282805588229, -0.91977010355816158, 0.2780210197678612]], [[-0.95925250991700795, 0.21180646452213847, 0.098900275263658521, -0.45498961978932129, 0.42722867963499356], [0.57971212220907309, -0.56103724327052551, 0.71849040687742782, -0.95431879543308606, 0.023758851957984772], [0.66152055670947507, 0.42687477863293255, 0.79046388523025923, -0.65568659176245947, 0.85552209907897669], [0.17686333502159002, 0.73751345595140827, -0.061927734152607439, -0.55136192300135312, -0.46832747975195099]]]])
61888          sub=res.substitute({arg1:s1})
61889          ref=numarray.array([[[-0.060027431135903697, 1.0846135312705116, -0.1916148996928882, 0.49568774538320098, 1.0062448005222213], [-0.38437623626047657, -0.35933414101365713, 0.69800463081119912, -0.5633953073491329, 0.33559113491467518], [0.17345874520087096, 0.66452976084490478, -0.90740147770345858, -0.52535220164592311, 1.252259488266048], [0.40902311689069354, 0.40253999051187572, -0.032433352413654679, -1.9386390420246029, -0.66127838088184743]], [[0.075721178436954695, 0.26310740400083577, 0.61150387507316939, 0.12979972919038876, 0.63280809642116254], [-0.078459554636866546, -0.61591601192842182, 0.61604320813119906, -0.34476232020774084, -0.51046548197659614], [0.60300547454079823, 0.91345020044751246, -0.29040867129776926, 0.086243673208763666, 0.8604546774813413], [0.89262120477695739, -0.4591031154761287, -0.16465376443953192, -0.15544042698454189, -0.13572248895520536]]])
61890          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61891          self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
61892          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61893       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61894       def test_generalTensorProduct_array_rank1_Symbol_rank3_offset0(self):
61895          arg0=numarray.array([0.83364130451665663, 0.963725923030196])
61896          arg1=Symbol(shape=(6, 2, 2))
61897          res=generalTensorProduct(arg0,arg1,offset=0)
61898          s1=numarray.array([[[0.80026845987009221, 0.42364160174969911], [0.73868037337609604, 0.44974360417778114]], [[0.40079978346080924, 0.87674787535778975], [0.50244342561615629, -0.82575784976592814]], [[0.60888183969789633, 0.03516322857888543], [-0.93083076979954282, 0.10404849571961039]], [[0.8104568529629459, 0.35857154150021997], [0.92959490362311437, -0.38578554223487194]], [[-0.20558665649670216, -0.59952475995708476], [0.021872595587329569, 0.41104326833419202]], [[-0.78164593952859396, 0.657208000754677], [-0.73705175754089369, 0.29616193109480116]]])
61899          sub=res.substitute({arg1:s1})
61900          ref=numarray.array([[[[0.66713684284963937, 0.35316513753014511], [0.61579447008209975, 0.37492484488478833]], [[0.33412325433426254, 0.73089324254547494], [0.41885759277647028, -0.68838585109373773]], [[0.50758905114225605, 0.029313519743519433], [-0.77597897721993458, 0.086739123704691765]], [[0.67563030815849434, 0.29892004761879187], [0.77494870812840877, -0.32160676269234439]], [[-0.17138552851312858, -0.49978860298065958], [0.01823389911858669, 0.34266264642690597]], [[-0.65161234069876472, 0.54787573508791276], [-0.61443678865268514, 0.2468928185860422]]], [[[0.77123946016025802, 0.40827439368021945], [0.711885424656168, 0.43342957006315924]], [[0.38626114126607108, 0.84494465544394914], [0.48421775412238383, -0.79580424596509902]], [[0.58679521297917903, 0.033887714918908129], [-0.89706574280997231, 0.10027423257728492]], [[0.78105827869786282, 0.34556468980465971], [0.89587470653835199, -0.37179152778200664]], [[-0.19812919029497614, -0.57777755266909825], [0.021079187371465382, 0.39613305318071773]], [[-0.75329245455499894, 0.63336838715013088], [-0.71031588535712598, 0.28541893041074257]]]])
61901          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61902          self.failUnlessEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
61903          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61904       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61905       def test_generalTensorProduct_array_rank2_Symbol_rank4_offset1(self):
61906          arg0=numarray.array([[0.28720169174230659, -0.93521276442752277, 0.88082216045026929], [0.33901224963528165, -0.49844209506510206, -0.91178566313768172]])
61907          arg1=Symbol(shape=(3, 6, 2, 2))
61908          res=generalTensorProduct(arg0,arg1,offset=1)
61909          s1=numarray.array([[[[0.71283865530646917, -0.71196744874915696], [0.30936239533682164, -0.48528034473690318]], [[-0.15527099542639733, -0.39895485720947743], [-0.87979516759253662, 0.62245267992799747]], [[-0.88392085517525953, 0.98407704137207563], [0.76027079156666466, 0.46926045919458592]], [[0.46267468790228983, -0.51568254290028093], [-0.44394427261432545, -0.5697436674189178]], [[0.6796410432395259, -0.38156579747976704], [0.64175885624325901, -0.38747409705115454]], [[-0.94435722714768211, -0.70483900723929138], [-0.83797272239303044, 0.40261485937696873]]], [[[0.50966656923326958, -0.87946250684245042], [0.65664230470156992, -0.94134852855904239]], [[0.51895559036463679, -0.39295571122290918], [0.58843026835848122, -0.87504078048566281]], [[-0.88437840902483944, 0.29365081372475133], [0.87602633419759868, 0.27011782255698757]], [[0.43493738268831672, -0.48255156582155601], [-0.8326643880899236, 0.5627250633868377]], [[-0.90625166644605049, -0.10112991622069156], [0.95548741487591227, 0.60182092154792688]], [[-0.25750968238999228, 0.44986815625440779], [-0.75405344436311306, -0.9972281100513023]]], [[[0.61568498578700326, -0.55714924228816454], [-0.51680087305650213, -0.077256854833225308]], [[0.05225680469667382, -0.1473735475908271], [-0.50239665841132441, -0.99432767517895471]], [[-0.95178342765468682, 0.67755828150951647], [-0.31114011765833505, -0.53693508330475992]], [[0.91646286340001004, 0.53999707062028834], [-0.4932416156325341, 0.22436087363827695]], [[-0.27868042491433109, 0.68859451750762424], [-0.83756810925850078, 0.66212781428026579]], [[-0.24684636851711961, -0.90450588164648082], [0.43194244918219526, -0.045729895234336126]]]])
61910          sub=res.substitute({arg1:s1})
61911          ref=numarray.array([[[[0.27039076593209288, 0.12725690720278376], [-0.98046052324604105, 0.67293827392196026]], [[-0.48389903323385025, 0.123106800488815], [-1.2455082685285057, 0.12129291896304673]], [[-0.26513352329607021, 0.60481095115709183], [-0.87497906283460214, -0.5907895579042507]], [[0.53336276038750619, 0.77882487150845092], [0.21675867258635712, -0.49227697784625968]], [[0.79726428969171792, 0.59152095655316161], [-1.4470183489594575, -0.090896972042011859]], [[-0.24782240292764257, -1.4198622221355186], [0.84499770400257956, 1.0079722211820961]]], [[[-0.57375097944055553, 0.70499613932058491], [0.2487911022818233, 0.3751334440044215]], [[-0.35895508649352198, 0.19498817214329156], [-0.13348168439639235, 1.5537899618957689]], [[1.0089739131597604, -0.43054168222114009], [0.10478580853920033, 0.51401666153963044]], [[-0.89555641310047629, -0.42666027264915019], [0.71426306911057313, -0.67820496989974677]], [[0.93621743432671511, -0.70679868085135755], [0.50499155862254086, -1.0350499945325065]], [[0.033275977366854836, 0.36153321132755756], [-0.30206997161695848, 0.67524770049721794]]]])
61912          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
61913          self.failUnlessEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
61914          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61915       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61916       def test_generalTensorProduct_array_rank1_constData_rank0_offset0(self):
61917          arg0=numarray.array([0.6160768652045161, -0.19852491943844375])
61918          arg1=Data(-0.127743684549,self.functionspace)
61919          res=generalTensorProduct(arg0,arg1,offset=0)
61920          ref=Data(numarray.array([-0.07869992872685018, 0.025360304683933566]),self.functionspace)
61921          self.failUnless(isinstance(res,Data),"wrong type of result.")
61922          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61923          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61924       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61925       def test_generalTensorProduct_array_rank2_constData_rank1_offset1(self):
61926          arg0=numarray.array([[-0.147330786554285, 0.75868746628337624, 0.91276304020295584], [0.86195142670321001, 0.82026307789735986, 0.51850854945729585]])
61927          arg1=Data(numarray.array([-0.032130921017267999, 0.97480750910482583, -0.41846172877515819]),self.functionspace)
61928          res=generalTensorProduct(arg0,arg1,offset=1)
61929          ref=Data(numarray.array([0.36235171329753918, 0.5549273305730611]),self.functionspace)
61930          self.failUnless(isinstance(res,Data),"wrong type of result.")
61931          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61932          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61933       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61934       def test_generalTensorProduct_array_rank3_constData_rank2_offset2(self):
61935          arg0=numarray.array([[[0.41445549411660632, 0.85461494166670349, -0.13442155510723586], [0.29381113957059513, 0.16370379553713321, 0.42037146043234652]], [[-0.76794214531167104, -0.67630130103778274, -0.46769123983501437], [-0.54173391783502134, 0.19605430787210909, -0.11215751913455962]]])
61936          arg1=Data(numarray.array([[-0.8421427135254449, -0.074943382571228456, 0.064562133179139058], [-0.01557261982862479, -0.95681115206026246, 0.64051923923966125]]),self.functionspace)
61937          res=generalTensorProduct(arg0,arg1,offset=2)
61938          ref=Data(numarray.array([-0.31370996966656212, 0.41621626444562154]),self.functionspace)
61939          self.failUnless(isinstance(res,Data),"wrong type of result.")
61940          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61941          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61942       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61943       def test_generalTensorProduct_array_rank4_constData_rank3_offset3(self):
61944          arg0=numarray.array([[[[0.99014107012803954, -0.84433100281306572, 0.52711335788699665], [0.045174970230898559, 0.42611183240792605, -0.47386295037597748], [0.62582408751937213, 0.90583999658225278, -0.92957102946391279], [-0.077735568516046127, -0.34188079263751137, -0.63762529526013512]], [[-0.24322222962612727, 0.16977736844854263, 0.55291098572193609], [-0.050506688321715121, 0.69037545585606375, -0.66099820277843402], [0.39252617737587658, 0.91012561537413394, 0.69641569683067561], [0.48756748434610886, 0.95727033843800546, -0.7590650638915768]]], [[[0.67960698951135723, 0.72963782147672562, -0.70754055734883936], [-0.16884852328678845, -0.74754495889362649, 0.88515452018232721], [-0.94920582773254036, -0.86753587238679786, 0.59840113807493611], [0.03481374302774598, -0.69285626872864192, -0.77389449106759378]], [[0.99162870066230369, 0.21744497416558239, -0.44466958710758808], [-0.72367316239216128, -0.19902897453533974, -0.92522545867758654], [0.30049803366336114, -0.97857344723928374, -0.30348033456497725], [-0.96210274523717443, -0.72175198401328156, 0.16233315282366068]]]])
61945          arg1=Data(numarray.array([[[-0.91067767844918945, -0.073546224498269641, 0.53337941986359061], [0.80413856236434755, -0.69499103854316235, -0.26040422737842195], [-0.076930636508680594, 0.45850375655261599, -0.060929787719397943], [0.5602655996825654, 0.17405201648963153, -0.80714244287081116]], [[-0.00354290311008576, 0.85390352597560293, 0.22067964179500366], [-0.47389997299794695, -0.55369425756313517, -0.14428104384186424], [-0.078158777817060265, 0.30111518171214335, -0.76508624529509728], [-0.54351815184111962, -0.49587993442095768, -0.98713975234704066]]]),self.functionspace)
61946          res=generalTensorProduct(arg0,arg1,offset=3)
61947          ref=Data(numarray.array([-0.13438557714464205, 0.57095048620887479]),self.functionspace)
61948          self.failUnless(isinstance(res,Data),"wrong type of result.")
61949          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
61950          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61951       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61952       def test_generalTensorProduct_array_rank1_constData_rank1_offset0(self):
61953          arg0=numarray.array([0.77222220157677213, 0.20023484376496881])
61954          arg1=Data(numarray.array([-0.87513477210940049, 0.78642316309113269]),self.functionspace)
61955          res=generalTensorProduct(arg0,arg1,offset=0)
61956          ref=Data(numarray.array([[-0.67579850039470801, 0.60729342637320338], [-0.1752324743666174, 0.15746931919470553]]),self.functionspace)
61957          self.failUnless(isinstance(res,Data),"wrong type of result.")
61958          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
61959          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61960       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61961       def test_generalTensorProduct_array_rank2_constData_rank2_offset1(self):
61962          arg0=numarray.array([[-0.71122442013988474, -0.88620202081667698, 0.81296611964484011], [0.26644445696728636, -0.39083505585295297, 0.66205348878542747]])
61963          arg1=Data(numarray.array([[0.50771144562442871, 0.78794870667652761], [0.044324453513875151, 0.67905968686319507], [0.15625523908072414, 0.72252988978874555]]),self.functionspace)
61964          res=generalTensorProduct(arg0,arg1,offset=1)
61965          ref=Data(numarray.array([[-0.27334698339857488, -0.57480010793031822], [0.22140267633512434, 0.4228976689122268]]),self.functionspace)
61966          self.failUnless(isinstance(res,Data),"wrong type of result.")
61967          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
61968          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61969       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61970       def test_generalTensorProduct_array_rank3_constData_rank3_offset2(self):
61971          arg0=numarray.array([[[-0.84838371111624244, 0.87084047489380612, -0.039771170324408578], [0.95565879050893998, 0.12320313337691635, 0.4760987180097318]], [[0.083224667627625593, 0.82146025505728515, -0.49835088106441283], [-0.080333264765126922, 0.37007844604262052, 0.9110665793821211]]])
61972          arg1=Data(numarray.array([[[-0.81787882248186472, 0.42738693357056556], [-0.42740870470139281, -0.073350120156100429], [-0.29451942498412698, 0.81913003167457621]], [[0.88607980420204102, 0.30665199762429629], [0.031080851224067008, -0.27428531225958275], [-0.10742756266296083, -0.21836521336906189]]]),self.functionspace)
61973          res=generalTensorProduct(arg0,arg1,offset=2)
61974          ref=Data(numarray.array([[1.1328567408737318, -0.30374365715880441], [-0.42994593424502503, -0.757985932157905]]),self.functionspace)
61975          self.failUnless(isinstance(res,Data),"wrong type of result.")
61976          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
61977          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61978       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61979       def test_generalTensorProduct_array_rank4_constData_rank4_offset3(self):
61980          arg0=numarray.array([[[[-0.75477003948876131, -0.71704296768544484, 0.26397395287596348], [-0.66681018202831033, 0.62666945183195755, 0.48397317513315707], [-0.66596837543542642, -0.9858846650055304, 0.037814269045928883], [-0.70467145693738908, -0.61269453651864181, 0.9016997671137077]], [[-0.23067795640527899, 0.79481050017073929, 0.16960236020331299], [-0.95466693667437141, 0.27523709539187391, -0.26467191052854599], [-0.77862046198395385, 0.55857353382595409, 0.61891714158016686], [0.79133984261254176, -0.55495264348055273, 0.90460853739402403]]], [[[0.36316730610424752, -0.28352374054786456, -0.91141795483724497], [-0.20709324834721632, 0.33112738696559996, -0.21944369465763303], [0.19056586286618882, 0.68855864738445116, 0.41303859220763339], [0.75891118623345832, -0.45156545177727181, 0.80506965702824029]], [[-0.094269189234492456, -0.97663563583654911, -0.41786962042486153], [0.030575017356307743, -0.53291000038335734, -0.78265946492668426], [0.046806092270876398, -0.46492433334052574, -0.28576611164083632], [0.42315871903369895, 0.4867600339631899, -0.97414758323719997]]]])
61981          arg1=Data(numarray.array([[[[0.44517142475667715, -0.50040115364086768], [-0.22212554112510774, -0.5803995103686046], [0.082177849553861426, 0.37348349687245008]], [[0.70361350501525122, 0.62415996096024551], [-0.49399447543611696, 0.77101094981260898], [0.23523535477231516, 0.64679347686153554]], [[-0.27097745351468006, -0.064683314660610503], [0.97398198262275848, 0.92544474303114144], [-0.698341073410923, 0.015590112423079283]], [[0.44286948263071979, -0.033804439989752133], [0.70182305857293303, 0.039351119933986878], [-0.82845571330963752, 0.56027720436538697]]], [[[-0.39356427820168172, 0.15985029162035036], [0.071600188724590508, -0.57265740377435526], [-0.89058895299357244, -0.61988081404304496]], [[0.90500014860027478, 0.6859047607336568], [0.51569006902708825, 0.53144881270932487], [-0.32322075637149061, 0.24555121269886682]], [[-0.18234437903250544, 0.92654610305520158], [0.17972838908310562, -0.9259071199701987], [-0.20662401295364075, 0.96188743517329311]], [[0.41513962750689459, 0.68152670341218657], [-0.93942130571291727, 0.30122191737425519], [-0.84081216373503365, 0.82524563734786383]]]]),self.functionspace)
61982          res=generalTensorProduct(arg0,arg1,offset=3)
61983          ref=Data(numarray.array([[-3.5513232696205592, 0.21335526423937778], [0.32119253058626618, 0.84439863121792413]]),self.functionspace)
61984          self.failUnless(isinstance(res,Data),"wrong type of result.")
61985          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
61986          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61987       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61988       def test_generalTensorProduct_array_rank1_constData_rank2_offset0(self):
61989          arg0=numarray.array([-0.37433185500928889, -0.13004333795062428])
61990          arg1=Data(numarray.array([[-0.85997567673353159, 0.45039995741422456, -0.33375460583773275, -0.80440823451266708, 0.34374787886949187], [-0.79048071690140387, 0.79633313914524018, -0.88282402244326974, -0.24028901768287136, -0.12780599883334021], [0.0021555036461409216, 0.66902112185580465, 0.69295542937784704, 0.51058638038249371, -0.054888158922924424], [0.55538751507474338, -0.36616074795143172, -0.99380498662004157, 0.13633111019559263, 0.76146031289640215]]),self.functionspace)
61991          res=generalTensorProduct(arg0,arg1,offset=0)
61992          ref=Data(numarray.array([[[0.32191629033453145, -0.1685990515549714, 0.12493498072113254, 0.30111562660987373, -0.12867578115272524], [0.29590211310677506, -0.29809286118160794, 0.33046915396795123, 0.089947833727589063, 0.047841856624599249], [-0.00080687367833921699, -0.25043591758467887, -0.25939529131776778, -0.19112874691105727, 0.02054638634766295], [-0.20789923876692809, 0.13706563201224811, 0.37201286415896168, -0.051033077374991964, -0.28503885144246377]], [[0.11183410755877547, -0.058571513874964787, 0.043402562999533684, 0.10460793189099579, -0.044702121581635591], [0.10279675101146102, -0.10355781953514598, 0.11480538270151965, 0.031247985932357177, 0.016620318698401155], [-0.00028030888910890672, -0.087001739845600196, -0.090114237087303317, -0.066398357217066634, 0.0071378394003014344], [-0.072224446316422289, 0.047616765890101394, 0.1292377177320457, -0.017728952636349254, -0.09902284080597494]]]),self.functionspace)
61993          self.failUnless(isinstance(res,Data),"wrong type of result.")
61994          self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
61995          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
61996       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61997       def test_generalTensorProduct_array_rank2_constData_rank3_offset1(self):
61998          arg0=numarray.array([[-0.49270204786421656, -0.42569639943642756, -0.52266174672625332], [0.65559150000470723, 0.81341516784513201, -0.11832324769855895]])
61999          arg1=Data(numarray.array([[[-0.49452884357026927, -0.57554748858249449, 0.96823447285855746, 0.89003155565245162, 0.86364482522644259], [0.30403656813796043, -0.091761858164602472, -0.097088596587888709, 0.4002977300806736, 0.33462079251164223], [-0.27707769749380429, -0.62947492718163645, 0.089687417694205518, 0.94578143992211072, -0.63403898742724119], [-0.85489284199926763, -0.89153283057341315, 0.9212768843091852, 0.98510149290122895, -0.39695573343646462]], [[0.056692245031661592, 0.21686720719295605, 0.72831396359612022, 0.83248444271675326, 0.35906924108125082], [-0.33830496849512626, 0.5053482042762476, 0.53660377691254779, -0.43829780517310546, -0.66884755476134772], [-0.18996006047533909, 0.80247252645390588, -0.28899656763966042, 0.58072230724852436, 0.69764533664927586], [-0.48456800390570565, 0.82638159594991767, 0.19997418762166541, 0.40447183113762319, 0.52599454004824731]], [[0.36572315231671948, 0.73148700704376535, 0.57129839539690463, 0.941002030363006, -0.11206843498549302], [-0.22454091745524085, 0.58269166402042227, 0.35072440074381195, 0.96282317339387191, 0.34674147653816934], [0.21496990741432787, -0.21237284045464233, 0.052946348809965293, -0.17976246089389969, -0.34322716715353851], [-0.95205496452051164, 0.99396516952659719, -0.80014407887239392, 0.28925861708497846, 0.32897167805253291]]]),self.functionspace)
62000          res=generalTensorProduct(arg0,arg1,offset=1)
62001          ref=Data(numarray.array([[[0.02837218776096026, -0.19106643979922686, -1.085687556792335, -1.2847317648475798, -0.51980017311066529], [0.11157471538131944, -0.47446429850827854, -0.36390477330482329, -0.51387655541762078, -0.061370859684548473], [0.10502551545102361, 0.079533080292729014, 0.051162592776307067, -0.61924488574308767, 0.19479891034431704], [1.1250890192379468, -0.43203519028453413, -0.12083859730375363, -0.80872813915653263, -0.20027399092057399]], [[-0.32136812548454868, -0.28747288394749326, 1.1595900338117631, 1.149310178999134, 0.87153087463561485], [-0.04929019237493823, 0.28195363007047519, 0.33133234245010729, -0.20801065828436199, -0.36570377633932627], [-0.36160211539595483, 0.26519355727580929, -0.18254066682056433, 1.1136846840843708, 0.19241648089403643], [-0.84196520946932396, -0.029899208082971779, 0.8613189779318462, 0.94060166880314233, 0.12868613501186707]]]),self.functionspace)
62002          self.failUnless(isinstance(res,Data),"wrong type of result.")
62003          self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
62004          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62005       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62006       def test_generalTensorProduct_array_rank3_constData_rank4_offset2(self):
62007          arg0=numarray.array([[[-0.8808240737788644, -0.02060651661006907, -0.81312290754309413], [0.048225222197601614, -0.41963096415707035, -0.89887875986035404]], [[-0.59610660691592376, -0.11996452471366958, 0.035487251666347364], [0.18022346144471091, -0.77786125405584827, -0.79267770442138152]]])
62008          arg1=Data(numarray.array([[[[0.22203243095759606, 0.09974898020502776, 0.34885282169406495, 0.18374267814765366, 0.94190258256383963], [-0.42752889482203038, -0.44377994884145067, 0.76587602300582791, 0.072624281803013835, -0.31655364896038685], [-0.23301909204111193, 0.67254783848259159, -0.64497522743282576, 0.73596580999241423, -0.14212807110643633], [-0.85520160141082724, -0.93118817379440055, 0.7292284482286131, -0.013793521839053469, 0.11069520128229637]], [[-0.2328270334082454, -0.51139257420371464, -0.80591791816387603, 0.85589407446335675, -0.54736631621173371], [0.28498427921497327, 0.4972848041167488, 0.27256206945985761, 0.55967992191525173, 0.26344571203821654], [-0.083173375666576455, 0.54967288635460942, 0.69078927956147074, 0.73917520864778785, -0.51350230037603128], [0.015745427796054035, -0.86276635919125755, 0.64299145604758667, -0.95853883944443874, -0.57373634347923885]], [[0.11450012551851274, -0.30795385683561016, -0.27342745933596424, 0.89096525612534982, 0.18282292404217815], [0.81727300436756334, 0.78195627520571032, 0.50973030393152396, 0.029368608714198441, -0.53723727877938576], [0.92988883961203883, -0.34268958914602887, 0.30054218081460671, -0.21341004753260107, -0.86823317381652565], [0.6045530374394632, 0.76536087215470028, 0.69023773708861413, -0.89551290241995241, 0.2360536246794509]]], [[[-0.029090389354334389, -0.95938892946002707, -0.46529942896988241, 0.49430739535098156, 0.11390298035429547], [0.18656938707742055, -0.28710626331459643, -0.095112754615466866, 0.009258713025689369, -0.40441010973741398], [0.82161288715352354, 0.47387664418064079, -0.035022496375434864, -0.62382398483692092, 0.58957922334661572], [0.19464711826708325, -0.2719568783209716, 0.74082142210272539, -0.37633416009477338, -0.30446302225416577]], [[-0.46582033101295228, 0.75716848635499501, -0.23013871535751762, 0.8761558468388968, 0.6614435340280056], [0.28784036727617357, 0.73938704719498172, 0.2646155394054055, -0.7723996307738672, 0.80780363334810246], [0.098651410264985362, 0.62612839559406996, 0.30773126963660924, -0.11492641339118226, 0.20918700837341797], [0.25703519706236788, 0.10160100130143945, 0.60478266311756257, -0.89622892335005111, 0.60096840217761094]], [[0.42381797359082807, 0.64145049197927673, 0.54393700601748063, 0.11743981931326553, -0.31821819092203008], [0.22360839302687974, -0.76664637694331028, -0.3875129956827561, -0.9134172669877052, 0.60667104771521196], [0.95900015316818643, -0.026750241960494137, 0.89706579297416655, 0.055661617487037907, -0.45520977112483507], [0.81582775689036624, 0.74813972869063283, -0.094993030794892297, 0.63081532031248599, -0.89030099098243376]]]]),self.functionspace)
62009          res=generalTensorProduct(arg0,arg1,offset=2)
62010          ref=Data(numarray.array([[[-0.47076766156290495, -0.7675032570633753, -0.48313993059573346, -1.3533344272641401, -0.95305828291468841], [-0.60662440777048365, 0.10982487647298811, -0.86199248686847785, 1.046238127585625, -0.19356658955840389], [-1.4129507682373896, -0.54091924680499015, -0.62767870990309893, -0.52185004510668132, 1.1915812405724895], [-0.57042149293960165, -0.51257790622691912, -1.3494919389043707, 0.5509739834688252, 0.25578400345886909]], [[-0.079210962086275483, -1.2793804205948272, -0.45698372214645544, -0.86612306433788921, -0.73106077184563789], [-0.11785750796244365, 0.21345277331594797, -0.38695542227004487, 1.2171425462895979, -1.0441074430894224], [-0.506959957108851, -0.85944557773426011, -0.64449895754981679, -0.60211485746012661, 0.41988650864174093], [-0.28218985897481974, -0.035328842199430333, -0.74896416224773987, 0.22071804328269096, 0.1945990923615909]]]),self.functionspace)
62011          self.failUnless(isinstance(res,Data),"wrong type of result.")
62012          self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
62013          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62014       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62015       def test_generalTensorProduct_array_rank1_constData_rank3_offset0(self):
62016          arg0=numarray.array([0.67427786450132854, 0.35682159762611643])
62017          arg1=Data(numarray.array([[[-0.13582218728164652, 0.82707300423024854], [0.17242867521024219, -0.52707721317267708]], [[-0.78774983037260249, -0.31288199421675889], [0.67645830804422324, -0.34667877385254475]], [[-0.062193953465745633, 0.78228566994773763], [0.69697996980179067, -0.68966647365025779]], [[-0.44087834425945216, 0.54814811911502836], [0.89236538255994158, -0.89496939446051083]], [[-0.37319488975032611, 0.18081895495596445], [0.1742407827751169, -0.37855867291937617]], [[-0.75718740438909293, 0.41879944447969142], [0.33655386850023139, 0.031170266030608573]]]),self.functionspace)
62018          res=generalTensorProduct(arg0,arg1,offset=0)
62019          ref=Data(numarray.array([[[[-0.091581894392168128, 0.5576770190790703], [0.11626483889955527, -0.35539649772538423]], [[-0.53116227338492217, -0.21096940290139321], [0.45612086337224073, -0.2337578233012329]], [[-0.041936006127777967, 0.52747791096235164], [0.46995816563815185, -0.46502683707105757]], [[-0.29727450847214498, 0.36960414318730117], [0.6017022245074285, -0.60345805209088033]], [[-0.25163705330365865, 0.12192221880906963], [0.11748670291864569, -0.2552537335645339]], [[-0.5105547060587815, 0.28238719507810905], [0.22693082374199697, 0.02101742041505705]]], [[[-0.0484642898589107, 0.29511751072286901], [0.061526275365073352, -0.18807253327659579]], [[-0.28108615300325424, -0.11164305304486923], [0.24137493420379935, -0.12370247394912813]], [[-0.022192145838331699, 0.27913642255076854], [0.24869750633807733, -0.24608789295705491]], [[-0.15731491515741466, 0.19559108759837518], [0.31841524147127892, -0.31934440915787748]], [[-0.13316399678661375, 0.064520108388472011], [0.06217287448144232, -0.13507791046631426]], [[-0.27018081933648841, 0.14943668686417355], [0.12008968904550246, 0.011122224123472817]]]]),self.functionspace)
62020          self.failUnless(isinstance(res,Data),"wrong type of result.")
62021          self.failUnlessEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
62022          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62023       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62024       def test_generalTensorProduct_array_rank2_constData_rank4_offset1(self):
62025          arg0=numarray.array([[-0.8414171582235519, 0.30176859578095439, 0.58504055830599722], [-0.66736294612972791, 0.85223569442908698, 0.73630544893008509]])
62026          arg1=Data(numarray.array([[[[-0.28034019828513257, -0.5896100289998889], [-0.16353717463781803, 0.96112363665321943]], [[-0.59695150035168876, -0.36176962663960777], [-0.76122161650111875, -0.89825581348212302]], [[0.76336660314480276, -0.37497815649619715], [0.88830517640056827, -0.22883745649257059]], [[-0.97415015960297557, -0.46263470375901328], [0.83321332494480083, 0.41974830446646116]], [[0.97180418324144546, 0.85329517250535147], [-0.098855326106938257, -0.76420766747314439]], [[0.62693999735278916, -0.49125379157290228], [0.88354486302988944, -0.11252037272921989]]], [[[-0.055177967779114656, 0.045296413577760264], [0.13404827545103992, 0.43441318907030269]], [[0.75679499873437162, -0.86531276984360517], [0.91000789360212808, -0.37318314106204764]], [[-0.55802142470438376, -0.98300175029045778], [0.32611582304111697, -0.35510617110835563]], [[0.37438337283306655, 0.63083523785572759], [-0.37451009404171787, 0.10766329608638103]], [[0.40833443878127573, -0.30371969472593818], [-0.4874142989129453, 0.1626240263173595]], [[0.58758202606321608, -0.42992195505338815], [0.91844109279383646, 0.92771940647056339]]], [[[-0.2976886049191243, 0.69995303590978275], [0.40964678862627668, 0.55770159105070216]], [[-0.41007385929936735, 0.25316458905718875], [0.87180747180161844, 0.0190653638213647]], [[0.49686730304596982, 0.68494857715201274], [0.41851397164447279, 0.99309007284037087]], [[-0.53250611153679772, -0.19042793787702639], [0.074612361397939475, -0.91936520079260231]], [[0.51492720975646056, 0.19675972172911882], [0.45201770540247965, -0.69472679480669441]], [[0.78168619089983005, -0.021059754759005234], [0.85870827667201577, 0.76228751016484408]]]]),self.functionspace)
62027          res=generalTensorProduct(arg0,arg1,offset=1)
62028          ref=Data(numarray.array([[[[0.045072167498935223, 0.91927794509710359], [0.41771453052355623, -0.35133561080332032]], [[0.49075235949412721, 0.1913865042369873], [1.4251594635747669, 0.65434691258485111]], [[-0.52001557527158604, 0.41959669498747665], [-0.40417605555142644, 0.66638584239123866]], [[0.62110613088488342, 0.46822697453673567], [-0.77044411568503435, -0.85855995419499687]], [[-0.39321690172987828, -0.69451784751125856], [0.2005409297545071, 0.28564891601609238]], [[0.10711385750608482, 0.27129161391795714], [0.036106040672471029, 0.82060226536996628]]], [[[-0.079125714927607949, 0.94746634083711834], [0.5250045383863029, 0.13944284447228295]], [[0.74141140619219814, -0.30961231905260733], [1.925468901691274, 0.29546058395884828]], [[-0.61916225901306388, -0.083171282436264149], [-0.0067402968960148524, 0.58130111672987184]], [[0.57708744270136292, 0.70615243759940904], [-0.82028908110121102, -0.86530356809728914]], [[0.078594791550913812, -0.68342308994887846], [-0.016596382336679427, 0.13706675588533179]], [[0.65792165404906111, -0.054056670455930433], [0.82535476283491915, 1.4270039674386905]]]]),self.functionspace)
62029          self.failUnless(isinstance(res,Data),"wrong type of result.")
62030          self.failUnlessEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
62031          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62032       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62033       def test_generalTensorProduct_array_rank1_expandedData_rank0_offset0(self):
62034          arg0=numarray.array([0.29115487485101577, -0.92058624546831314])
62035          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62036          arg1=msk_arg1*(-0.98690142804)+(1.-msk_arg1)*(-0.76468651016)
62037          res=generalTensorProduct(arg0,arg1,offset=0)
62038          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62039          ref=msk_ref*numarray.array([-0.28734116177116109, 0.90852788028630016])+(1.-msk_ref)*numarray.array([-0.22264220516594166, 0.70395988334860971])
62040          self.failUnless(isinstance(res,Data),"wrong type of result.")
62041          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
62042          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62043       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62044       def test_generalTensorProduct_array_rank2_expandedData_rank1_offset1(self):
62045          arg0=numarray.array([[-0.93610562681808984, 0.10378670816956537, -0.6406743208488439], [0.46455866754430919, 0.96760752415530793, 0.46044492106547819]])
62046          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62047          arg1=msk_arg1*numarray.array([-0.87433409270128148, 0.08998261487198489, -0.51239683641173372])+(1.-msk_arg1)*numarray.array([0.38283487176473474, -0.37481589977652274, 0.41164354845062046])
62048          res=generalTensorProduct(arg0,arg1,offset=1)
62049          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62050          ref=msk_ref*numarray.array([1.1560875584597956, -0.55504214679636932])+(1.-msk_ref)*numarray.array([-0.66100423684397858, 0.0047137542931757204])
62051          self.failUnless(isinstance(res,Data),"wrong type of result.")
62052          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
62053          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62054       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62055       def test_generalTensorProduct_array_rank3_expandedData_rank2_offset2(self):
62056          arg0=numarray.array([[[-0.27844168614466147, -0.095458702093299097, -0.75204233570228118], [-0.77969105642932335, -0.40539834359387661, 0.023424225802739063]], [[0.063079448469969934, 0.15874359589307074, -0.82728342758477114], [0.3643907679272369, 0.23196323302076571, -0.50630191450525808]]])
62057          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62058          arg1=msk_arg1*numarray.array([[0.31217869013741106, 0.45819759196953314, 0.91338852760958655], [0.76904716070208923, 0.98152925870510721, 0.62346661947792459]])+(1.-msk_arg1)*numarray.array([[0.35723835535980708, 0.046533644843017141, 0.64767896554838189], [0.61659097493132853, 0.89567276797294992, 0.62083369756270601]])
62059          res=generalTensorProduct(arg0,arg1,offset=2)
62060          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62061          ref=msk_ref*numarray.array([-1.8004946559637984, -0.47095315631831763])+(1.-msk_ref)*numarray.array([-1.42030626984827, -0.3877788378780993])
62062          self.failUnless(isinstance(res,Data),"wrong type of result.")
62063          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
62064          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62065       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62066       def test_generalTensorProduct_array_rank4_expandedData_rank3_offset3(self):
62067          arg0=numarray.array([[[[-0.86203815370676407, 0.88648224286799171, -0.38452407224253693], [-0.46071855687976693, 0.8586457771625009, 0.037036902773721847], [0.1881681544450049, -0.20839311565038021, 0.12509054139061448], [-0.43081955516318438, -0.0088692839201998108, -0.13803890124233775]], [[0.81623934567894785, -0.050788722017519161, 0.91176548145987923], [0.96823772412961673, 0.86884436732030212, 0.23907626590257047], [0.75559066784077378, -0.65582359259300205, -0.53760253067996167], [-0.84323947632390528, 0.6934215459637012, -0.59227571906648624]]], [[[-0.25777810203980334, -0.21814236286210531, -0.43246308055155303], [-0.99530719662785505, 0.3533948078447835, 0.62127608202896889], [-0.26136821534411125, 0.070198516358207286, -0.83830727278858874], [0.52558803670458309, 0.27597664998370197, 0.68879285745108443]], [[-0.93059227228277841, 0.72030334971118237, 0.96692171710246955], [-0.59894877093386323, -0.082739724763901901, 0.40633121158963226], [-0.66987320171247067, 0.1674568775135965, 0.5538152509341483], [-0.02966270303085361, -0.20276500886129778, 0.11675540799808104]]]])
62068          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62069          arg1=msk_arg1*numarray.array([[[-0.95870994948189536, -0.1693406955788368, -0.60552624845409508], [-0.20965230518883282, -0.11303671679882132, 0.58547932226790222], [0.35431173214629474, 0.96469780889006063, -0.16874838566023143], [-0.35595512304521892, 0.067234067256850327, 0.10677388363591578]], [[-0.59949107728149165, 0.098530273481613362, 0.846975545321488], [0.76114764834682513, 0.49472104472565603, 0.52386510056675628], [-0.93264227734981109, -0.023985624737179689, 0.74131816851261401], [0.21527174688341777, 0.13972173775871455, 0.26086833461282399]]])+(1.-msk_arg1)*numarray.array([[[0.65820391082560414, 0.53705567060814019, -0.73116351630946408], [0.39599413821283891, 0.31102752414801293, 0.49531801658287722], [0.22694855172826944, 0.39611876925310519, -0.13363576636984287], [-0.40611627716086485, -0.83287756387037226, -0.78666239358211021]], [[0.40474813642881169, -0.80033715552398332, 0.74170381177548328], [0.0023823306792924992, -0.036412734592137008, -0.81900336670928131], [0.3265854558303507, 0.022783328089716282, -0.62868657633332936], [-0.26240459887855083, -0.49620438016689739, -0.22707804450351565]]])
62070          res=generalTensorProduct(arg0,arg1,offset=3)
62071          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62072          ref=msk_ref*numarray.array([1.1562414069369997, 3.2908847053255363])+(1.-msk_ref)*numarray.array([1.9308237189329767, -1.9001695476925771])
62073          self.failUnless(isinstance(res,Data),"wrong type of result.")
62074          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
62075          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62076       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62077       def test_generalTensorProduct_array_rank1_expandedData_rank1_offset0(self):
62078          arg0=numarray.array([-0.95183416146539646, -0.80840515776198618])
62079          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62080          arg1=msk_arg1*numarray.array([-0.65815107380220117, 0.68239014658138952])+(1.-msk_arg1)*numarray.array([-0.9225185278432928, 0.022234635287948334])
62081          res=generalTensorProduct(arg0,arg1,offset=0)
62082          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62083          ref=msk_ref*numarray.array([[0.62645067545006838, -0.64952225296354582], [0.53205272264828907, -0.55164771410235303]])+(1.-msk_ref)*numarray.array([[0.87808464938601261, -0.021163685434793217], [0.74576873603951233, -0.017974593847734099]])
62084          self.failUnless(isinstance(res,Data),"wrong type of result.")
62085          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
62086          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62087       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62088       def test_generalTensorProduct_array_rank2_expandedData_rank2_offset1(self):
62089          arg0=numarray.array([[-0.53439976652275312, 0.42037713600795867, -0.86528805366263817], [-0.55963038967778078, 0.95127858496616535, -0.2547752443514979]])
62090          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62091          arg1=msk_arg1*numarray.array([[0.0092311296347167282, -0.5164230921009485], [-0.86153656744382512, -0.96439171784069333], [-0.19199528280736633, -0.57924062379753982]])+(1.-msk_arg1)*numarray.array([[0.088011214563954887, -0.057907099615626567], [0.68258740356562986, -0.72858993558715079], [0.38842519918913143, 0.62530388310971374]])
62092          res=generalTensorProduct(arg0,arg1,offset=1)
62093          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62094          ref=msk_ref*numarray.array([[-0.2009721637369028, 0.37177814347814475], [-0.77581166235763011, -0.48082296096319366]])+(1.-msk_ref)*numarray.array([[-0.096188719328219346, -0.81640498989544297], [0.50111590404151019, -0.81999737983614895]])
62095          self.failUnless(isinstance(res,Data),"wrong type of result.")
62096          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
62097          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62098       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62099       def test_generalTensorProduct_array_rank3_expandedData_rank3_offset2(self):
62100          arg0=numarray.array([[[-0.57751158972654504, -0.88227518602905852, -0.89134985212393048], [0.32092214174534317, 0.081471612073153787, -0.66338459945531647]], [[-0.87597525244806307, 0.21348800353113506, 0.85949001658947632], [-0.88550230417698761, -0.39920779922819505, -0.47120320847210451]]])
62101          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62102          arg1=msk_arg1*numarray.array([[[-0.028812235426639576, -0.22209286764317193], [-0.0058056813464393286, -0.28565742859450172], [-0.66132872409783783, 0.32564512398375101]], [[-0.66567096211121513, -0.92727600105647157], [-0.52286496151683504, 0.5080017220624411], [-0.59842032109304166, 0.66582638298051022]]])+(1.-msk_arg1)*numarray.array([[[-0.85470084785081313, 0.96604272440464878], [0.3389593344405939, -0.31280712475982675], [0.96014403863407716, -0.87918624581692861]], [[0.36362592228564905, -0.34261654301827016], [-0.25514137595147734, -0.69460580450413056], [0.0082411831956854531, 0.83083204817619727]]])
62103          res=generalTensorProduct(arg0,arg1,offset=2)
62104          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62105          ref=msk_ref*numarray.array([[0.75199249174915561, -0.60786871649050611], [0.53575644250351862, 0.71801941282029547]])+(1.-msk_ref)*numarray.array([[-0.57083825476567096, -0.21596145005282441], [1.422274321425349, -1.4794728229067164]])
62106          self.failUnless(isinstance(res,Data),"wrong type of result.")
62107          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
62108          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62109       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62110       def test_generalTensorProduct_array_rank4_expandedData_rank4_offset3(self):
62111          arg0=numarray.array([[[[0.69159689651634126, -0.59090842509553143, -0.43135145353526427], [-0.85755695962978895, 0.90444021996380708, -0.85971361299009419], [-0.53895774793285645, -0.63033054477634431, 0.93428861019956178], [0.12299329903454237, 0.067704742323386302, -0.27868318807727044]], [[0.99523971168037506, 0.46153683557296721, 0.14018910273506258], [0.47703047692507483, 0.0047738926026992257, -0.61741912764866669], [-0.13024185961681045, -0.61232926300550994, 0.76182271590697992], [-0.75209876075994497, -0.055722854973428548, 0.82614719001010628]]], [[[0.7211460891642083, -0.60402768296748111, 0.19368109445438164], [0.42842708432208654, -0.85042559191090095, 0.71018735606345507], [0.097728493743475031, 0.22182769654230383, 0.22868747450683991], [0.54128597637741427, 0.072859757703582329, 0.34631714875160946]], [[-0.018781736926382964, 0.29077138320300411, -0.27523765279888246], [-0.39991690554215475, -0.62511312122452334, -0.4519563441182477], [-0.60815044921226757, -0.069183550613817646, -0.62675461869291582], [0.72475084110073329, 0.1009870909350985, -0.40135913316866278]]]])
62112          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62113          arg1=msk_arg1*numarray.array([[[[0.2714786143168173, 0.7494569218751852], [-0.66840954813273945, 0.68287402737501046], [-0.17185448776577172, 0.11974417099990919]], [[-0.63652796825392732, -0.18008736960253335], [0.11022825302457862, 0.42893403096432747], [0.15732822649890621, 0.50567747478371738]], [[-0.47494751829399262, 0.2856235030976384], [-0.62763151253532956, 0.91680161771086155], [-0.51028314023700272, 0.076092007263474315]], [[0.4826811592122211, -0.59568618450752386], [0.084383931514229849, -0.84335741501559469], [0.56392407045697746, -0.4419053614418329]]], [[[0.34178305372535966, 0.37988220006384266], [-0.36444859447203637, 0.44743991832476659], [-0.59222173620597895, 0.3544596391106376]], [[0.91214344914864065, 0.17010396306962106], [-0.070698214560513284, -0.15767350139424918], [0.24097557183936824, 0.32871436598467896]], [[0.16938731087469905, -0.40674660966800436], [-0.30808827481075385, 0.090452911865188446], [0.96989817308638915, 0.803542905682193]], [[0.14863210698789953, 0.89305106615937846], [0.35120876555130187, -0.88123575553722677], [-0.63118989111319435, -0.58198595823451771]]]])+(1.-msk_arg1)*numarray.array([[[[0.87458542573314046, -0.098393421806612924], [-0.40725192915153463, 0.009187722909765883], [-0.558873701402542, -0.70837118716980885]], [[-0.48202577818102865, -0.70787427447265627], [0.08410603310050635, -0.24362819286110216], [0.93531410068538356, 0.14215059996114543]], [[0.12621712632838156, -0.31731010570612161], [0.28291687010727684, -0.22507048646829197], [-0.12734329148427381, -0.22078847278169911]], [[0.18793670166937293, -0.83923175834671015], [-0.080617779388756361, 0.5576124801275284], [0.62963956354474404, 0.30809329932510576]]], [[[0.25723270353601491, 0.4487530039604215], [-0.86011558828098833, -0.85426775787757525], [-0.11307191256432358, 0.79273833884876765]], [[0.90385519796863312, 0.73123586567713827], [0.89086988761973052, -0.3570581542268696], [0.32624764389976679, 0.46050759704798572]], [[-0.048392477541703727, -0.70402162378852684], [-0.25090355658000663, 0.47577646563708242], [0.37327487480029276, -0.12809825413405895]], [[-0.39890666625614291, 0.036286276831182462], [-0.59226111552599137, 0.91281475180418936], [0.27915607280106447, 0.36341786064335824]]]])
62114          res=generalTensorProduct(arg0,arg1,offset=3)
62115          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62116          ref=msk_ref*numarray.array([[1.8775075843770035, -0.47905670539861511], [-0.20005988227364535, 0.2168358200945118]])+(1.-msk_ref)*numarray.array([[1.3338867513020598, 0.60296320850136587], [-0.4231995710883284, -0.95143894581038047]])
62117          self.failUnless(isinstance(res,Data),"wrong type of result.")
62118          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
62119          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62120       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62121       def test_generalTensorProduct_array_rank1_expandedData_rank2_offset0(self):
62122          arg0=numarray.array([0.27085458013892416, -0.761233747538685])
62123          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62124          arg1=msk_arg1*numarray.array([[0.6282254653676167, 0.66336261818162656, 0.62949010506867231, 0.21983756527088194, -0.31326350691617511], [0.77956086644159073, -0.99825821970040374, 0.93493854035737733, 0.2790104740152819, 0.29948379103350442], [0.27564407792033796, 0.95398663368491876, 0.9341263093207588, 0.30021451148270262, -0.16967946935232336], [0.31228271689270226, 0.26402616536698953, 0.71921859263476384, 0.26667198250776458, -0.33568466803827035]])+(1.-msk_arg1)*numarray.array([[0.98934766013174724, 0.4382220278769926, 0.14132373851055258, -0.9181264274417229, -0.21975962549435457], [0.25330433017376142, -0.48947413745648971, -0.27532084950845359, -0.57884540683316521, 0.71475450532935114], [-0.36891992059617196, 0.10375862551888648, 0.23788354189138938, -0.36142898643368548, -0.81354427867434631], [0.71222029279450783, 0.77225287657191455, -0.88059776034403026, -0.70113739035096301, -0.36845191007242395]])
62125          res=generalTensorProduct(arg0,arg1,offset=0)
62126          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62127          ref=msk_ref*numarray.array([[[0.17015774465472605, 0.17967480342744191, 0.1705002781099825, 0.059544011440208065, -0.084848855638627568], [0.21114763117277299, -0.27038281096718275, 0.25323238580419605, 0.075571264793771381, 0.081116556478793136], [0.074659460992894028, 0.25839164912487433, 0.2530123893077969, 0.081314475459259641, -0.045958461429618992], [0.084583204168615395, 0.071512696166166109, 0.19480364993619689, 0.0722293278569551, -0.090921729820579847]], [[-0.47822642530102522, -0.50497401181547341, -0.47918911171994599, -0.16734777366093373, 0.23846675333691075], [-0.59342803979583636, 0.75990784559383429, -0.71170676879459449, -0.21239218873719792, -0.22797716857552699], [-0.20982957442214417, -0.7262068202617854, -0.71108847111872209, -0.22853341764147328, 0.12916573833544456], [-0.23772014287179397, -0.200985627310582, -0.54749346457086012, -0.2029997126079563, 0.25553449784205196]]])+(1.-msk_ref)*numarray.array([[[0.26796934509641146, 0.11869444336825075, 0.038278181857938826, -0.24867874801917828, -0.059522901094760619], [0.068608637996585564, -0.13257631198963957, -0.07457191309710412, -0.15678292963314169, 0.19359453144338584], [-0.0999236501979614, 0.028103498950709859, 0.064431846860952449, -0.097894696370532802, -0.22035219402476397], [0.19290812837127805, 0.20916822864496235, -0.23851393664925927, -0.18990627348321107, -0.09979688740405103]], [[-0.75312482694071925, -0.33358939653480518, -0.10758039908256511, 0.69890882107576724, 0.16728844327276546], [-0.1928238045259488, 0.37260423197926906, 0.20958352204685446, 0.4406366582891651, -0.54409525066202102], [0.28083429369709806, -0.078984567343204998, -0.18108498007175811, 0.27513194181202294, 0.61929736004392899], [-0.54216612255706265, -0.58786495128036809, 0.67034073318085896, 0.5337294431963574, 0.28047802829221785]]])
62128          self.failUnless(isinstance(res,Data),"wrong type of result.")
62129          self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
62130          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62131       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62132       def test_generalTensorProduct_array_rank2_expandedData_rank3_offset1(self):
62133          arg0=numarray.array([[-0.89076447496715128, 0.87539787153488069, -0.10040401630418772], [-0.25888231137033602, 0.79182869856722293, 0.8486492404149617]])
62134          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62135          arg1=msk_arg1*numarray.array([[[-0.37626405022890896, 0.96996241659488214, 0.94083631785676447, -0.92099542792847711, 0.26368361308189292], [0.43428664975305775, -0.87620265780048423, -0.72798638320344189, 0.66417763701402999, 0.94402359908265199], [0.094054914424213765, 0.1471937029183219, 0.39235011388237728, -0.43970283872615146, -0.04329485019665924], [0.35940224977990365, 0.058628951418325359, -0.26082713581151462, -0.39588426044180336, 0.48251663711488191]], [[0.42699452628670831, 0.73526133579421238, 0.0074535182202144501, 0.7358977050430664, 0.41420616604791949], [-0.61509760162490812, -0.03287365325784819, 0.48001982919602892, -0.21258347477212425, 0.50692686551287713], [-0.92898024764680254, 0.46339006253143022, 0.60077609196584447, 0.77471239800208425, -0.088303128751292093], [-0.62436155387923264, 0.026829101469713956, -0.19194167222184166, -0.18133208254937849, 0.1070232588426272]], [[-0.073982856268555386, -0.61868286422325691, 0.62511534846888783, -0.43764632559992767, 0.28456746033414992], [-0.87384441124812962, 0.33875667857850256, 0.76356645553102531, -0.50540072890539967, -0.39118410004169357], [-0.82436572347412151, -0.27538834051902938, 0.47128604617722103, 0.17154171813145647, -0.75370705693781526], [-0.79131104650325312, -0.89551801032584732, 0.17061789795339077, 0.17311122353528119, -0.80920506425741467]]])+(1.-msk_arg1)*numarray.array([[[0.81399836433348072, 0.5947058839640087, 0.50867425514925868, 0.39873844275272075, 0.7361122583014339], [-0.23099084996904362, -0.30322135927946658, 0.73116731166687621, 0.95045192764291508, 0.96195156138762528], [-0.30266035851449447, -0.33895888199980506, 0.37060007508642845, 0.253408385058981, -0.89943390385351862], [0.85793967300136909, -0.94042973915197203, -0.1238173551502737, 0.69292647008265007, -0.061862818777513207]], [[-0.80370283964710154, 0.85859721499155439, -0.7779844476011275, -0.71821682913180851, 0.46337259846731338], [0.3558489867779393, -0.94486824197804609, 0.090922341717106558, 0.61218447849560298, -0.30118565442223022], [-0.61203946346101867, 0.047984184900190963, 0.11361036747760922, 0.68672570877244632, -0.92259914764591811], [0.53556409767576185, -0.16461660440889703, -0.14173554799358912, -0.025171143190497292, 0.51410785190609443]], [[-0.0002342625806208698, -0.16648861823586514, 0.83854711254042535, -0.98909902761303359, 0.58576920173369063], [-0.37775820521221881, -0.23291294112003902, -0.5842470912099258, 0.95077327660807476, 0.54357655306337049], [0.98937229761854972, -0.059928414219934778, 0.76910064285561552, 0.78277084462156865, 0.90591947406928242], [-0.82417099341902267, 0.88840209440649542, 0.36017184168222149, -0.13898180515707104, 0.42690868007998573]]])
62136          res=generalTensorProduct(arg0,arg1,offset=1)
62137          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62138          ref=msk_ref*numarray.array([[[0.71638092452661539, -0.15824360999326934, -0.89430286635995471, 1.5085347422789634, 0.09914348504360701], [-0.83756476228689958, 0.71770014326982645, 0.99200760633972218, -0.72697670243356616, -0.35786353174111246], [-0.81423847841281327, 0.30218584836337525, 0.12910755711589228, 1.0526297750780551, 0.036940359178822747], [-0.7872567244465033, 0.06117515610321185, 0.047179493158585252, 0.17652085418521446, -0.2548733074618581]], [[0.37272913227771742, -0.19394982850253067, 0.2928396946939999, 0.44972612541571561, 0.50121526523451243], [-1.3410684609184069, 0.48828866516505043, 1.2165563666613397, -0.76918148268712483, -0.17496986049363089], [-1.4595397191811474, 0.095111598111981582, 0.7740957917898017, 0.87284954587114494, -0.69834560199487916], [-1.2589758003252762, -0.75391462519685182, 0.060333356770094604, 0.10581419380527256, -0.72690219764715702]]])+(1.-msk_ref)*numarray.array([[[-1.4286170598992811, 0.23858742596012278, -1.2183483832939415, -0.88459800823544776, -0.30888084333824822], [0.55519632980331146, -0.53365143827341344, -0.51304388760445063, -0.40618527841275937, -1.1751068274376888], [-0.36551590056459726, 0.34995483736739474, -0.307883900917791, 0.29683770007251808, -0.097415514640130457], [-0.21264043333801094, 0.60439723934888911, -0.049945595146734065, -0.6253147170560982, 0.46229077451115413]], [[-0.84732355832397188, 0.38461264211045965, -0.036084809447573418, -1.5113291652715284, 0.67345786684874709], [0.020986671318356409, -0.86733653458018867, -0.61311221430016927, 1.0455630660159252, -0.026213859541991513], [0.43335305020987475, 0.07488751030592089, 0.64671482175322148, 1.1424640585123191, 0.27111491912076507], [-0.49746247063807508, 0.86705423552254579, 0.22548340844306392, -0.31726444311671365, 0.785396267887434]]])
62139          self.failUnless(isinstance(res,Data),"wrong type of result.")
62140          self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
62141          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62142       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62143       def test_generalTensorProduct_array_rank3_expandedData_rank4_offset2(self):
62144          arg0=numarray.array([[[0.1063401450973509, 0.7347201265110952, 0.77557257223333576], [-0.73542281536299914, -0.28039277069155211, -0.11093720810248753]], [[-0.61993729208668347, -0.061906177645713711, 0.88894013651824588], [0.12260622376961283, 0.49766036507753442, -0.75978333750907545]]])
62145          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62146          arg1=msk_arg1*numarray.array([[[[0.58934142497165043, 0.52072267920554216, -0.24474900185541282, -0.2339032907627383, 0.20216098693689877], [0.95010527418772717, 0.55691375490173778, -0.42868414647327047, -0.8142870000527882, -0.75770157825760642], [-0.068550015156339184, -0.74051479447311119, 0.98586554943291982, -0.64297423499979578, 0.78246000792773307], [-0.098820424618294656, -0.1720129197876834, 0.26211118700658642, -0.52374470532212558, 0.6339607302502186]], [[0.85966828916736304, -0.01155394276102184, 0.32183546985303879, -0.07190262283629667, 0.18121834184349095], [-0.77537330415614814, 0.43157188986442763, 0.16876526738685471, 0.9413919737879568, 0.96440948866919696], [-0.48173201675316202, -0.4565981300219133, -0.41611248741151985, -0.81492699566492477, -0.81430201516927303], [0.88138778438611975, -0.73009913653432168, 0.095981472491643238, -0.2718713419486527, -0.85560622484582582]], [[0.50719470480713702, -0.084409034760861035, -0.57220195228152182, 0.15404510359216106, -0.44448976261939843], [-0.8536562365588638, 0.29636917171095378, -0.78504686298305804, -0.21331230180392358, -0.710772757639754], [-0.49583261372963228, 0.35955161363159927, 0.58630467633233296, -0.94629479197891642, 0.07419563379308447], [-0.016179687553983912, 0.39888477747431805, 0.94940469634095082, 0.60371784213955482, 0.58659729554638784]]], [[[0.53552791582705384, -0.46300755951753603, -0.51887345943107666, -0.45581919535954096, -0.74747240536396564], [-0.77048791181745702, 0.23704151648023108, -0.49418530279478934, 0.66878670820914543, 0.90121276760669833], [0.3351674343806561, -0.58299469935552417, -0.028083885024752009, 0.036103656727092925, -0.38567002717484966], [0.11797140777311999, -0.99817792014530649, 0.40779214920414075, -0.921750596458077, -0.72089830941069799]], [[0.75274316068062075, 0.73841939946695168, 0.19303211181341839, -0.95916107922353788, -0.86709809507916202], [0.82538601080696616, -0.58017675666252444, -0.58201782479566355, -0.17582745324932092, 0.16015893460559849], [-0.0022676355598854059, 0.24577353184572504, -0.97907765390122603, -0.41470031909688387, 0.84425091589415069], [0.62702195590585164, 0.75928175775096829, 0.88414372285028353, 0.64979153702213477, -0.53500939622936605]], [[0.30027144273108508, 0.89899564997589509, -0.92916623923867503, 0.88136984737211299, -0.75210012709254204], [-0.12587664756149453, -0.85843796241966497, -0.35781498938042722, 0.82061886191296352, 0.038700438981897678], [0.25299956148293146, 0.99718711337756494, -0.68221776342570362, -0.4976783432793046, 0.21490861252196236], [-0.99525103424889694, 0.50256023605425537, -0.62305943613047798, -0.0045169326618819117, -0.031477365905458132]]]])+(1.-msk_arg1)*numarray.array([[[[0.28091576643077798, -0.38165757100343822, 0.80700093117070026, -0.62610901843753308, -0.41353036913547236], [-0.82881110772740985, 0.32106482888905896, -0.044908397238956121, 0.33319920204956488, 0.67262011512847453], [0.69995356606247805, 0.50347884387876563, -0.56277625281790278, -0.90165197419903031, 0.77403800116773125], [0.77538833471041491, 0.44824092846781816, -0.0024780121103866737, -0.58904099787263831, -0.57701096175118649]], [[0.26184723557308165, 0.84796625109029211, 0.095973415749075253, 0.72895101803199469, 0.73510131880506879], [-0.58045954319132798, -0.11168494155481024, -0.4446049583809073, -0.97498189599881679, -0.76649061016432962], [0.25746025885088497, -0.23803361394803924, 0.84023190140370119, -0.4886795790763736, -0.05600385072515901], [0.63146130629204666, 0.47602482633473753, -0.78325166645988498, 0.63261763207027122, -0.065571415180843751]], [[0.98978639793935907, 0.33041266015524151, 0.45507905078001687, -0.46640036401192786, 0.11049719839082828], [0.91083896594419489, -0.46268510701864973, -0.075480717993535507, 0.13845294173647327, 0.2668739919294596], [0.12170774119249983, -0.4026126399394192, 0.44314080315334059, -0.4469777362961842, 0.72837971161695347], [-0.35781784374386638, -0.059319728422007945, 0.86217927222470947, -0.71906654545594639, 0.23942604062478101]]], [[[-0.94573218477036747, 0.22118010418470924, 0.67892428519722303, -0.82235529251235939, 0.040532530776837383], [0.83917939686881393, -0.70655880446834485, 0.58339948714670964, 0.13838580213699214, -0.46273377849380481], [-0.20868587191257015, -0.023209495786937095, -0.99345396137764386, 0.61394512683099878, 0.48552737378751631], [0.47399755242008013, 0.42211205856270206, -0.46406803281513187, 0.21717387977671754, -0.43220160213149672]], [[-0.31214125060322995, 0.93271820758799273, 0.93753470922960025, -0.24350189298137259, 0.84773553297058646], [0.86389739633213414, 0.96903149857012427, -0.5699533816464426, 0.86342125132430581, -0.53958019960295633], [0.26713363733418616, 0.11335025136093879, 0.86786015852660769, -0.7421325270539294, -0.34894362855751848], [-0.15346126415864081, 0.55952536518288998, -0.90125861724459377, -0.26791327917962482, 0.5242388093756658]], [[-0.6764867755927666, 0.18182155247275311, -0.008730963857910945, -0.57438207973052613, -0.11403850615974753], [0.085756451333229622, -0.09336552373878293, 0.85036339966003061, 0.83759185189488305, -0.55679297803716099], [0.37401685053224454, 0.14762381641539246, -0.095382515538033896, -0.88149302887226311, 0.84509265836944536], [0.80135525904334504, 0.29157013320523495, 0.087131686714815304, -0.72546347352247209, -0.97647922784024077]]]])
62147          res=generalTensorProduct(arg0,arg1,offset=2)
62148          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62149          ref=msk_ref*numarray.array([[[0.44943808511352612, 0.01514627286710489, 0.19719389292089173, 0.54815650152532192, 0.68618070961586863], [-0.78155387990152392, 0.68974698362097675, 0.035871822538538073, -0.093948360762736285, -0.63523204703737968], [-1.0197030170736783, 0.11384941056045859, 0.62469585199799293, -1.256098960162489, -0.43446574802886834], [0.47235532702580108, 0.22008675506541142, 0.35603801943731406, 0.70896323019301422, 0.57740297799443563]], [[0.24442047791538596, -0.76946218200042604, 0.36156449021575654, -0.91647938269023732, -0.48340243877933209], [-0.88792031529593196, 0.28404452955387594, -0.52092551939684562, -0.37209044715706024, -0.06101477328093597], [-0.52070636285621452, 0.10014565578866419, -0.036578839058394208, -0.21597236660024671, -0.15912964595291751], [1.0749995007912609, 0.38006427695663242, 1.6389209160323681, 1.0919834347863884, -0.1493223202288107]]])+(1.-msk_ref)*numarray.array([[[1.8479909702301192, 0.39433223370920706, -0.25192874896578482, 0.84404248951334837, 0.32696110156400698], [-0.67708532323279991, -0.14849322351655808, -0.75354797826054676, -1.0103153210514304, 0.26871901474652377], [0.39506520917841714, -0.46469416675920172, 1.3990258978425365, -0.94721847918286284, 0.25309662611885092], [-0.12557076715895446, -0.14825941082406582, 0.67727479419709846, -0.15964287588200157, 0.35534222842017021]], [[0.93219113421872168, 0.8309764420013751, 0.45475456358217065, 0.14281857053996705, 0.82257945121064913], [1.8270860478620496, -0.13686780327409448, -0.86994039785412247, -0.21285966859042055, -0.034516479240326692], [-0.51849093699240667, -0.71388591211016816, 1.0733620975532849, 0.56757078292043206, -0.58511613402528517], [-1.4649750552206109, -0.25140479825088402, 0.24483056357942121, 0.13129053668213414, 1.5244202237019748]]])
62150          self.failUnless(isinstance(res,Data),"wrong type of result.")
62151          self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
62152          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62153       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62154       def test_generalTensorProduct_array_rank1_expandedData_rank3_offset0(self):
62155          arg0=numarray.array([-0.70655521088462447, 0.22854912801047367])
62156          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62157          arg1=msk_arg1*numarray.array([[[0.62682397995702521, 0.74658842325501573], [0.46436859069751057, -0.49740292812453357]], [[0.40674697443543439, 0.37889930474566014], [-0.29143619788113329, -0.50180586882605183]], [[-0.037252484854398027, -0.85874127917761212], [-0.78338659167318281, -0.88726552896983923]], [[0.22800197782355514, 0.89418589464460041], [0.14744720771656961, -0.31683668156005296]], [[0.059346667875287418, 0.60226913399488136], [-0.52554046850049785, 0.38750214003644468]], [[-0.21532092433386785, -0.15381524804315272], [0.67074482877365349, 0.3077463691295812]]])+(1.-msk_arg1)*numarray.array([[[0.83196796150556285, 0.061796374414873956], [0.95283433254538297, 0.97948915895176203]], [[0.57170301510769583, -0.52680724631507636], [-0.59968299300210415, 0.63087563814855563]], [[-0.12970134468597982, -0.94232737861980742], [0.54258848650047198, 0.26169731939619623]], [[0.41956970409478678, 0.76378353149135214], [-0.23040301855708534, -0.44668202481542574]], [[0.96995213564809757, -0.6000602989475019], [-0.80841963559245489, -0.45308168367369572]], [[0.88903583338070535, 0.20113070611977979], [-0.54311552814072162, -0.23676249933680227]]])
62158          res=generalTensorProduct(arg0,arg1,offset=0)
62159          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62160          ref=msk_ref*numarray.array([[[[-0.44288574934607555, -0.52750594083696689], [-0.32810204752847544, 0.35144263077565951]], [[-0.2873891942989113, -0.26771327816860752], [0.20591576425331728, 0.35455355147153328]], [[0.026320937292275477, 0.60674812560466995], [0.55350587848383292, 0.62690208293194261]], [[-0.16109598552323348, -0.63179170336067225], [-0.10417959294252986, 0.22386260835564784]], [[-0.041931697435923468, -0.42553639497905354], [0.37132335654977361, -0.27379165627169344]], [[0.15213612110058827, 0.10867896501840059], [-0.47391825394394005, -0.21743980073932873]]], [[[0.14326007403523275, 0.1706321331176483], [0.1061310364793686, -0.11368100549271845]], [[0.092961666328116963, 0.08659710570339535], [-0.066607488896420861, -0.11468729375073228]], [[-0.0085140229296960454, -0.19626457054264199], [-0.17904232242200294, -0.20278376295980843]], [[0.052109653216236881, 0.2043654065002887], [0.033698930751201166, -0.072412747292282226]], [[0.01356362919322413, 0.13764808540215326], [-0.12011181581000459, 0.088563276207521885]], [[-0.049211409498914678, -0.035154340814977272], [0.15329814573375297, 0.07033516431295514]]]])+(1.-msk_ref)*numarray.array([[[[-0.58783129849081406, -0.043662550356606482], [-0.67323006276971342, -0.69206316926236566]], [[-0.40393974440279368, 0.37221840501569708], [0.42370914358452449, -0.44574846955402475]], [[0.09164116094662185, 0.66580631972307336], [-0.38336872250291021, -0.18490360469392036]], [[-0.29644916075749156, -0.53965523416307548], [0.16279245336505549, 0.3156055122418342]], [[-0.68532473575083341, 0.42397573106634301], [0.57119310610929819, 0.32012722455602882]], [[-0.62815290073829211, -0.14210994847783445], [0.38374110652018179, 0.1672857776484851]]], [[[0.19014555213474771, 0.014123507486728188], [0.21776945584168897, 0.22386139317413745]], [[0.13066222558382254, -0.12040133677490952], [-0.13705702513334189, 0.1441860769819035]], [[-0.029643129229766571, -0.21536810068395246], [0.12400812545820554, 0.059810694150679064]], [[0.095892290010475986, 0.1745620601111087], [-0.052658408982202837, -0.10208878726951831]], [[0.22168171481426938, -0.13714325807815572], [-0.18476360278120044, -0.10355142372114041]], [[0.20318836448922498, 0.045968247499806512], [-0.12412858036550979, -0.054111862769006508]]]])
62161          self.failUnless(isinstance(res,Data),"wrong type of result.")
62162          self.failUnlessEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
62163          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62164       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62165       def test_generalTensorProduct_array_rank2_expandedData_rank4_offset1(self):
62166          arg0=numarray.array([[-0.99284960193132088, -0.51982266840284241, 0.8215003955668887], [0.64252159175176837, 0.5085065099060635, -0.86623342670929393]])
62167          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62168          arg1=msk_arg1*numarray.array([[[[-0.50031991364893713, 0.11427379123022852], [0.48252754079696691, -0.13936690575407606]], [[0.46576700100754076, 0.98277774876930901], [0.52965031267989948, 0.020804644485333368]], [[0.058593543875176568, -0.29501213702910944], [-0.75332346932056904, 0.36787604093280479]], [[-0.99626234214496279, 0.90338659297312152], [-0.87031804102975818, 0.023334480967474702]], [[0.54208659369311207, 0.59101178140033905], [-0.34786360842552488, -0.21450091782674874]], [[0.62578035595363457, 0.82644778998995427], [-0.016412877094006628, 0.59012327780721407]]], [[[-0.72312672808438827, 0.036901695533946066], [0.37879968041278556, -0.97799967975835078]], [[-0.84875797240168871, -0.087802935859226716], [0.60013066625857436, -0.039461478713115339]], [[-0.73760411628399725, -0.16610574970060332], [-0.94565916708426623, -0.89401889052882111]], [[0.9089153822495899, -0.70244072881526942], [-0.13613521373391868, -0.86813132471366483]], [[-0.74766813057495729, 0.12366820907983], [0.35361385969803183, 0.13882946492246373]], [[-0.44811106298903014, 0.78542753572163182], [-0.12926741218139903, 0.87400298352422245]]], [[[-0.6444329937253459, 0.0068239752019536581], [-0.84051948138480359, 0.023694231767414919]], [[0.27496201567306966, -0.28777296918329243], [-0.69594616861665304, 0.43631473140377408]], [[-0.27192141699667549, -0.1616430858961968], [0.32323221049899598, 0.98954763780178201]], [[-0.41122953686967145, 0.95778903958407358], [-0.44926352997041041, -0.073263712160966943]], [[-0.2976229177380616, -0.75102334970567841], [-0.79224479510209722, -0.35657998970107374]], [[0.12217342652843777, 0.19000201644815662], [-0.51516312357496008, -0.61501871262557639]]]])+(1.-msk_arg1)*numarray.array([[[[0.80857279598744114, 0.062643192534418413], [-0.024124022759439478, -0.26055565830586414]], [[-0.095688136535071022, 0.19186613050696133], [0.42017140067258407, -0.80907983234481273]], [[-0.86095967602771228, 0.85919741690276119], [0.850434618274724, 0.86423179482366308]], [[0.95875097148848121, -0.01011455712048237], [0.43484394218224587, 0.95645632792262303]], [[-0.89501101906325764, -0.4659165204187381], [-0.013261982650479176, 0.97296816807559838]], [[-0.33296195405386153, -0.07560291340836045], [0.65203924127865531, -0.69888619610514935]]], [[[-0.62662995138581068, -0.4622060267467154], [0.80101388056372347, -0.35891789406708541]], [[0.62211190125148286, -0.50607336824268079], [0.85112911463529661, 0.16958447241492292]], [[0.35099889975840837, -0.36292892306851088], [0.73021534757463091, -0.3448771645520925]], [[0.10955081613938988, -0.48490972912346186], [0.93983330025018463, 0.37752330487022734]], [[0.23480746571472455, 0.38766594456920545], [-0.18699090339220548, -0.98985726804815877]], [[-0.8218382793223018, 0.89844658791565757], [-0.82817152418402862, -0.23104054633466831]]], [[[0.23612839666851682, 0.077948024566344865], [-0.17690905049187422, 0.62264137853217871]], [[0.86829931685154116, -0.22696650556150866], [-0.57157014934161188, -0.87746120133717143]], [[0.90273528322173502, -0.76296197487611139], [0.64156187954856625, -0.096495312704755865]], [[-0.2340832698357822, -0.60446582382942382], [0.67126294296859168, 0.62832897040892344]], [[0.072749360978900279, 0.085247508095577018], [-0.12236580507706263, -0.17394610238480901]], [[-0.90473704568524482, -0.091141502343677239], [0.73456912181207534, -0.94061770267405609]]]])
62169          res=generalTensorProduct(arg0,arg1,offset=1)
62170          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62171          ref=msk_ref*numarray.array([[[[0.34323813322917751, -0.12703312764741675], [-1.366473023902778, 0.66622160089903049]], [[0.20464845714024568, -1.166514148258154], [-1.4095446792437867, 0.35828981260804887]], [[0.1018652116135757, 0.2464583578563036], [1.5050473670586864, 0.91239948036347918]], [[0.1788386232571969, 0.25504166971208175], [0.56579092307233037, 0.36792054307598743]], [[-0.39405296069686208, -1.2680373292037097], [-0.48926966754296553, -0.15213015462141261]], [[-0.28800197058034072, -1.0727346650937664], [-0.33971506017130654, -1.5454683402518552]]], [[[-0.13095159558157032, 0.086276975219371208], [1.2307425375930485, -0.60739018554292645]], [[-0.37051488847949487, 0.83608612421414596], [1.2483339470076666, -0.3846493904332291]], [[-0.10188145694618903, -0.13399687872589086], [-1.2448949825498767, -1.0754253676105423]], [[0.17829009383703959, -0.60641917356494301], [-0.23925668840208986, -0.36299404577771227]], [[0.2259191492997894, 1.093185449669154], [0.64257399390526859, 0.24165572190031626]], [[0.068379291788924795, 0.76581946670844125], [0.36997256931998207, 1.3563529215138428]]]])+(1.-msk_ref)*numarray.array([[[[-0.28307515393034871, 0.24210423441875861], [-0.53776450138709619, 0.95676637782190921]], [[0.48492429197868403, -0.1138788767096286], [-1.3291483192041289, -0.0056939874892899534]], [[1.413943679202998, -1.2911686962855025], [-0.69689282487784443, -0.75804816307569745]], [[-1.2011420167305784, -0.234459610044297], [-0.36883851570969794, -0.62968995842750397]], [[0.82631671943376905, 0.33109834769770563], [0.0098457072890749536, -0.59435760386740188]], [[0.014549469979123653, -0.46684336049329861], [0.38657425458931938, 0.041271180079275216]]], [[[-0.0036622398463170558, -0.26230635416421899], [0.5450651003123842, -0.88927749690642932]], [[-0.4972836347675067, 0.062542503195873317], [1.1978870618002786, 0.32646976970828218]], [[-1.1566794337749444, 1.0284043378696595], [0.36199951712229195, 0.46350277054552957]], [[0.87449625643190121, 0.27052992658743547], [0.17583757398762101, 0.26223734328761283]], [[-0.51868070796507848, -0.17607500889662875], [0.0023901487734229593, 0.27248211972693437]], [[0.15186811151791813, 0.48723925038438809], [-0.63848964771753924, 0.2482594027725199]]]])
62172          self.failUnless(isinstance(res,Data),"wrong type of result.")
62173          self.failUnlessEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
62174          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62175       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62176       def test_generalTensorProduct_array_rank2_float_rank0_offset0(self):
62177          arg0=numarray.array([[0.70256681769804308, -0.89304203095639134, 0.89620407509848721, -0.24465218943155254, 0.072349928183562895], [-0.49562914015701298, 0.81392934532580763, 0.096748603015513579, 0.54106186492168118, -0.16195371828838945], [-0.44206941156178936, 0.23427641461408988, 0.15396469517359135, 0.93969752262564787, 0.59672259343765099], [-0.52709693781176759, -0.40882648274709688, -0.60888193281882375, -0.066699046444738563, -0.17955814339905984]])
62178          arg1=0.0129612549167
62179          res=generalTensorProduct(arg0,arg1,offset=0)
62180          ref=numarray.array([[0.0091061476202284972, -0.011574945414590733, 0.011615929474774429, -0.00317099939316139, 0.0009377458623951307], [-0.0064239756297406634, 0.01054954572898467, 0.0012539833065227392, 0.0070128407569777021, -0.0020991234274500264], [-0.0057297743341464579, 0.0030365163307935453, 0.0019955756623233844, 0.012179659135381897, 0.0077342736481247542], [-0.0068318377768123916, -0.0052989042596001228, -0.0078918739454633142, -0.00086450334367386657, -0.0023272988689721184]])
62181          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
62182          self.failUnlessEqual(res.shape,(4, 5),"wrong shape of result.")
62183          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62184       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62185       def test_generalTensorProduct_array_rank2_array_rank0_offset0(self):
62186          arg0=numarray.array([[-0.64477915422427268, 0.14212893254486847, -0.17502579382986094, 0.017476722765484176, -0.31150925666943841], [0.67545083910387649, -0.33561794227724095, -0.28092880043761226, -0.76895557214213306, -0.89310180447234444], [0.96264049665813656, 0.66695101232719756, 0.48328612305636054, -0.083992173413074633, 0.20294230093391308], [0.87684786750727284, 0.43917443473167084, 0.47284029513488735, -0.080655481104712434, -0.18861972588598341]])
62187          arg1=numarray.array(-0.466603480111)
62188          res=generalTensorProduct(arg0,arg1,offset=0)
62189          ref=numarray.array([[0.30085619726431673, -0.066317854549950969, 0.081667644510269727, -0.0081546996633166686, 0.14535130324886855], [-0.31516771217001943, 0.15660049985438032, 0.13108235594770479, 0.35879734601255531, 0.41672441006054767], [-0.44917140583683218, -0.31120166341567718, -0.22550298690763365, 0.039191040416659009, -0.094693583877574469], [-0.40914026650713425, -0.20492031962174498, -0.22062892724682967, 0.037634128173516336, 0.088010620516054086]])
62190          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
62191          self.failUnlessEqual(res.shape,(4, 5),"wrong shape of result.")
62192          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62193       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62194       def test_generalTensorProduct_array_rank3_array_rank1_offset1(self):
62195          arg0=numarray.array([[[0.51651976078155082, -0.48900909438819595, 0.73093394040689308], [0.43546767535817166, 0.43632139168007189, -0.055346908513881576], [-0.59603430155196402, 0.78251909559571153, -0.78349396188260956], [-0.87039484205774786, 0.52802435003447323, 0.84519861016841458], [-0.78459234944782286, 0.43523277611709132, -0.1346011109463916]], [[0.65198484359554243, -0.21597755498324056, -0.045436632095025464], [0.27028348931945789, -0.087348685416429594, -0.6680818078060442], [0.5168299639290983, 0.51459259819847736, 0.096211701369114166], [-0.13146270299202145, -0.21074827742220603, 0.6114034269267925], [0.24822593851867469, 0.19403456664372487, 0.87202157088988641]], [[-0.45556821974363704, -0.44493491514148498, 0.84152223287724626], [0.73243379450920609, -0.088622182447032127, 0.18989029125357737], [0.32628129971615505, -0.34145831311918218, -0.72290982982024987], [0.18449965648439881, 0.95756277814674884, -0.57862484416886639], [0.55687448999060396, 0.48725031254022899, 0.067966582012516152]], [[0.67429362026844419, -0.94430221399486602, -0.74526329288835225], [-0.067904060174055259, -0.61966038936320711, -0.7267483430099595], [0.52871831837124561, 0.37731475138194792, 0.60147750632954233], [-0.7167624110802544, -0.36197817014900191, -0.4538878392138086], [0.6166857301938744, 0.031209706315663555, -0.081277166810240997]]])
62196          arg1=numarray.array([-0.89000002389473343, 0.051155631229641729, 0.8074302108950091])
62197          res=generalTensorProduct(arg0,arg1,offset=1)
62198          ref=numarray.array([[0.10545997731491186, -0.40993471127751713, -0.062115893970066005, 1.4841017412163346, 0.61187081375213914], [-0.62800190397048439, -0.78445012406417947, -0.35597013673243572, 0.59988644558750415, 0.4931014304127348], [1.0621652739822622, -0.50307646038473941, -0.89155711643984259, -0.58241915027793834, -0.4158144404449905], [-1.2501758117285884, -0.55806307105255182, 0.03439356807947358, 0.25291858746386486, -0.61287940231956151]])
62199          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
62200          self.failUnlessEqual(res.shape,(4, 5),"wrong shape of result.")
62201          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62202       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62203       def test_generalTensorProduct_array_rank4_array_rank2_offset2(self):
62204          arg0=numarray.array([[[[0.11359149857412709, 0.62223492098498245, 0.61624973156776486], [0.42856935440404076, 0.76738569992247574, 0.0068041041611515141]], [[0.45505897008946405, 0.22558591722770482, 0.39886607959770304], [0.87677742811452974, 0.67841888151699492, -0.19860277075284305]], [[-0.74440084821443664, 0.88785576247761577, 0.072855425836091614], [0.55797601842570232, 0.29814137531714335, 0.20575142800628177]], [[-0.55651007861326418, 0.22485153116461398, -0.56110166122691707], [0.56856029656942986, 0.96474640955619284, -0.99254747922550002]], [[-0.92981368999931813, -0.81857816070292611, 0.35581265862816647], [0.64205575647322721, -0.71371930387374594, 0.11824718849344507]]], [[[0.42585839299070249, -0.6092499546805894, -0.19978088505417912], [0.5921754789012359, -0.95654497533374294, -0.96817856903480415]], [[-0.35653850496113293, 0.59003985623903321, 0.021943133302768869], [-0.17422939434125628, 0.14893762912519048, -0.42560436793922496]], [[-0.4558021107120227, 0.285666137135969, 0.30812270447782364], [0.15875025818283794, 0.0060421114597595249, 0.64128933142879752]], [[0.51687373082737853, -0.71358462575914317, -0.51824276615902365], [-0.4748189951045354, 0.66922158838218193, -0.51497454399191378]], [[-0.6230914895905042, -0.10459060849879265, 0.93513505090904503], [-0.31841260866933596, 0.5241642865700733, -0.40719137826562135]]], [[[-0.82622695606198726, 0.2646568279873609, 0.48052466143507755], [-0.66991304550137043, -0.22073535759583063, -0.56919222589057439]], [[-0.71555337093767801, 0.54163862515813999, -0.35739729353948024], [-0.54211786564996478, 0.47649792006107128, -0.89397888095636513]], [[-0.65839086632948707, -0.58821984622232781, -0.24971124649764342], [-0.28894539953175524, -0.99226489274258634, -0.090647897373135056]], [[0.3921854713622952, -0.64097181419522942, 0.85493708800766366], [-0.43401262707404742, 0.71988135867947389, 0.13752639916991338]], [[-0.02563731519982726, -0.68770638896312675, -0.64504293876273056], [-0.12931505512125363, -0.72126991891579806, -0.18106407390492452]]], [[[-0.89652327967778556, 0.56420287319635687, -0.90802707516778502], [-0.1192435100433924, -0.048391708963940738, 0.78502305152399376]], [[0.42506857464571124, 0.20079303003637139, -0.098008718714911014], [0.89931317348018425, -0.64702786095734099, 0.32132811414482365]], [[-0.85778717247632175, 0.34875667445257852, 0.033305394637672459], [-0.36372808735870854, 0.18456949252849797, -0.72683963575994937]], [[0.19458328329732644, 0.64870186112543271, 0.58745765657603388], [0.8661646645152441, 0.18819038987247083, -0.7406496524171613]], [[0.13991868471777291, 0.73190229773289794, 0.64725953704882544], [-0.70180644018482696, 0.17412151837829826, -0.72318368922912546]]]])
62205          arg1=numarray.array([[-0.066988924225406477, -0.089914462635613868, 0.98472935483579427], [0.14271262674878105, -0.48924616248884045, 0.3975281949408167]])
62206          res=generalTensorProduct(arg0,arg1,offset=2)
62207          ref=numarray.array([[0.23170848246086329, 0.056270964367504381, 0.057336107994252053, -1.3208940230391728, 0.9740888894798182], [-0.0028589177894156048, -0.27448257238351786, 0.582895824688199, -1.0806857626922517, 0.50824245321893868], [0.29085723639890759, -1.0185802559659378, 0.259286911555699, 0.51377454749918805, -0.30919497606362778], [-0.5661070839905652, 0.42959508217095266, -0.3722469844177837, 0.24423628407793885, 0.089363030547507438]])
62208          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
62209          self.failUnlessEqual(res.shape,(4, 5),"wrong shape of result.")
62210          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62211       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62212       def test_generalTensorProduct_array_rank2_array_rank1_offset0(self):
62213          arg0=numarray.array([[-0.46363245472843229, -0.54452675971181641, 0.86555927302725855, -0.68362843177860366, 0.50922403215831724], [0.79387039320598873, 0.16724334772625427, -0.095083253003442225, -0.047193090518169223, 0.40761838311031129], [0.6483724628296641, 0.729683779250905, 0.97607297501888679, -0.83907437568163967, -0.35928060985655708], [0.72595610410235079, 0.049324367163139371, -0.42024134914962952, 0.22304083542942643, -0.33374820413977258]])
62214          arg1=numarray.array([-0.54752666526987048, 0.0021590525800481153])
62215          res=generalTensorProduct(arg0,arg1,offset=0)
62216          ref=numarray.array([[[0.25385113184834274, -0.0010010068475754628], [0.29814292089521888, -0.0011756619054610372], [-0.47391678235402823, 0.0018687879816140737], [0.37430479553541002, -0.0014759897294258412], [-0.27881373620292071, 0.0010994414604539192]], [[-0.43466520904855588, 0.0017140079206752017], [-0.091570192469125372, 0.00036108718140425339], [0.052060616439986121, -0.00020528974271644964], [0.025839475475192338, -0.0001018923638436975], [-0.22318193400708525, 0.00088006952172935864]], [[-0.35500121242593902, 0.0013998702387045369], [-0.39952132635476434, 0.0015754256462109258], [-0.53442598107213268, 0.002107392875029767], [0.4594155948303667, -0.0018116056956677057], [0.19671571421088604, -0.00077570572767205988]], [[-0.39748032481146706, 0.0015673773995638586], [-0.0270064062693804, 0.0001064939021828166], [0.23009334450840796, -0.00090732316912440841], [-0.12212080484167984, 0.00048155689118999019], [0.18273604125245765, -0.0007205799212344011]]])
62217          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
62218          self.failUnlessEqual(res.shape,(4, 5, 2),"wrong shape of result.")
62219          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62220       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62221       def test_generalTensorProduct_array_rank3_array_rank2_offset1(self):
62222          arg0=numarray.array([[[0.057878150023086716, -0.79096230952887203, -0.74879752761820217], [-0.085774073234239134, -0.80255606255561962, 0.61893382102270689], [0.38066168190116678, 0.17841858097455909, 0.26732894780889294], [0.10352889709491953, -0.44726387355488728, 0.76021297388746056], [-0.73480564445365926, 0.50331520550406084, -0.38918351404128249]], [[-0.84716773948232027, 0.12730278518590454, 0.0028553691887278632], [0.096471847215960915, 0.79248530574361609, 0.63285890498524799], [0.49611392978157709, 0.083410756971258548, -0.2096717369131762], [0.66066199680002802, -0.26913604504765831, 0.35511213697911148], [0.13995402196674966, -0.94031534719036292, -0.82700404523290039]], [[0.77292212444378827, 0.98704207837379032, -0.42675540454425964], [-0.82613193079213687, -0.97309825947172945, -0.88780781701656841], [0.37739108423584788, -0.98298576471935895, 0.69119911656720867], [-0.41925510579083469, 0.61207793196919935, 0.46295892929670268], [-0.19714928414628208, 0.59501997884747193, -0.31082224386403046]], [[0.9449929655509921, 0.69415150872013887, -0.33218415609004981], [0.51441777355708251, -0.31313508236326437, 0.62889707609465528], [0.51928491120999287, 0.36808013495619374, -0.98553510595674076], [-0.22479264109228514, -0.77612379798780595, 0.33992382154124079], [-0.29380739525606758, 0.28481867071743272, -0.91928819878438062]]])
62223          arg1=numarray.array([[-0.65544108334594164, 0.83273898243034994], [0.5815051944337668, -0.71020437712138884], [-0.71584773219930908, 0.49357543157186545]])
62224          res=generalTensorProduct(arg0,arg1,offset=1)
62225          ref=numarray.array([[[0.038140603076380675, 0.24035422326652411], [-0.85353303987731777, 0.80404194187402789], [-0.33711679459360466, 0.32222516525511136], [-0.87214009157007011, 0.77908375581894274], [1.0528983500233395, -1.1614493875707341]], [[0.62725176223517132, -0.79447125650347705], [-0.055427902185096745, -0.17012705790751081], [-0.12657662577302262, 0.25040590632049275], [-0.84373524104562425, 0.91657522244551692], [-0.046520904273868458, 0.3761723667511328]], [[0.37285706965838383, -0.26799520403039323], [0.6111543275679342, -0.43505374659186558], [-1.3137622694282016, 1.3535479624783031], [0.29931541793776423, -0.5553253432712526], [0.69772834726055777, -0.74017391087632201]], [[0.022058769759363966, 0.12998510245483108], [-0.96945476545548037, 0.96117378516837182], [0.57917291627816847, -0.31541924967669865], [-0.54731538461866969, 0.53179097023677169], [1.0162673462729805, -0.9006824074393891]]])
62226          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
62227          self.failUnlessEqual(res.shape,(4, 5, 2),"wrong shape of result.")
62228          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62229       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62230       def test_generalTensorProduct_array_rank4_array_rank3_offset2(self):
62231          arg0=numarray.array([[[[-0.54688844052075258, -0.65131322835599637, -0.4395611967426043], [0.53004782336123135, -0.28512778697352759, 0.63037917090587681]], [[-0.036577740804340397, 0.29669393735587257, -0.10075509863972387], [0.37402291311214309, -0.32145063727746082, 0.97513765010062725]], [[0.40302801811395339, -0.47782141247386711, -0.14764357527423089], [0.65465840534068986, -0.24883920145334559, -0.49425115453037605]], [[-0.85418926357252234, 0.8800418825442895, -0.97681309714413267], [0.47709268451718834, 0.70334993728605744, 0.38188895589332761]], [[0.32509745224252873, 0.037152711736442745, -0.94062910540000799], [-0.88401732047171699, 0.16747046594034054, 0.18511668997329944]]], [[[-0.18393608823444052, -0.78938349932788299, -0.66209453554939479], [0.72459455492634706, -0.32338204775031132, -0.43695368726508588]], [[0.31531159108096185, -0.58662135497576329, 0.54378800957299123], [0.10858501601247972, 0.28701647612019432, 0.78870443432819481]], [[-0.60628756803418016, -0.19621032211007994, 0.75098049465582606], [0.47618409948266804, 0.89236015856583006, 0.31714100807616341]], [[-0.62027342852786771, -0.53027522060601884, -0.85612879295155531], [0.26311917573979571, -0.88975881845260463, 0.42731457303418074]], [[-0.56090605057124532, -0.44261868291373063, 0.40802055192916065], [0.78769509954166561, 0.20858939338740434, 0.016327904954584582]]], [[[-0.46677250606911191, -0.20953793776687446, -0.28548891796555398], [0.87016845751426897, -0.38663177116039615, 0.8584601851880187]], [[-0.86565314937033366, -0.97734446338850889, -0.68197698067283952], [-0.88719966504012437, 0.93196090085414807, 0.59175052068726419]], [[-0.67677889252873324, -0.72999078856616029, -0.17568479400110726], [0.98472949512608854, 0.025778388190602408, 0.33393676013222828]], [[-0.94122733770752665, -0.52715624079975698, 0.022021084371674826], [-0.85926212987873352, -0.79928660513832517, 0.48782818673352724]], [[0.97503096117363541, -0.09555839043137615, 0.87002270552154548], [0.4057828259233407, -0.1731792384590658, 0.75290248432128437]]], [[[0.31113423838777665, 0.9771278197398805, -0.28868381013255107], [0.64771540003483596, -0.02244814358973013, 0.34710159506404659]], [[0.80484315187736444, 0.33771712015164823, -0.64980895170019415], [0.99481794046315741, 0.21211067712827303, -0.3286989665008182]], [[-0.22194923484870888, 0.56187270860724636, -0.49649707662351394], [-0.21391184676841601, 0.99830594339051859, -0.52005395227544882]], [[0.65366853820070636, -0.61602733120461739, -0.36448166579662233], [-0.72256258752464064, -0.19161174336703657, 0.73033779357911865]], [[0.75705762850610259, -0.64824263025091344, -0.56296536362637872], [0.3108621474230111, 0.42959519102548316, -0.12291261522373476]]]])
62232          arg1=numarray.array([[[-0.56482467849400231, 0.50385277202421563], [0.37484768216288611, -0.56408800461333253], [0.64816775783170066, 0.90701009690374512]], [[-0.68692081555055373, 0.26948975670108655], [-0.77883374718403742, -0.34750325210521416], [0.5133951495722997, -0.038244899825524703]]])
62233          res=generalTensorProduct(arg0,arg1,offset=2)
62234          ref=numarray.array([[[-0.038556693359247829, -0.089023217082385808], [0.56063225862696298, -0.10197073502712151], [-1.0120884882485315, 0.62048464976490358], [-0.50024754449722686, -1.9432361436455674], [-0.20752565531454981, -1.0138261560016955]], [[-1.0913633979615964, 0.076436999807802247], [0.061266037297184384, 0.88235737267146164], [-0.10362378119880797, 0.2924467623956965], [0.32827160736809669, -0.42616265213086119], [-0.27979319325051172, 0.47630639065189445]], [[0.14416944831734096, -0.039902555067586103], [-0.13205337154902314, -1.0889955632192752], [-0.53031390736681072, 0.15507930461718974], [1.8115035399666799, -0.1293687331542954], [0.22005292502492046, 1.4750347563247577]], [[-0.24582327942798946, -0.48718076147320177], [-1.7665005655679229, -0.16740784988694599], [-0.88340134432060369, -1.2637754560094718], [0.18415905150055678, 0.19018857428414288], [-1.6467167292370792, 0.17568542665521436]]])
62235          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
62236          self.failUnlessEqual(res.shape,(4, 5, 2),"wrong shape of result.")
62237          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62238       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62239       def test_generalTensorProduct_array_rank2_array_rank2_offset0(self):
62240          arg0=numarray.array([[0.96238903821825073, -0.16263253916272413, -0.93128822680073009, -0.36608053566035692, -0.76556761049634114], [0.30681269986560711, -0.10364804404936945, -0.9181717601197914, -0.49122591136894411, 0.072883536061314036], [0.71520886999839939, 0.44189075659960886, 0.86619781158574294, -0.74089775366442367, -0.23016247460971773], [-0.63165910549855409, 0.95766272091718019, -0.91595580903292184, 0.30870732251937327, -0.13745144882682681]])
62241          arg1=numarray.array([[-0.87708521263646433, -0.92542397209068872, 0.27608907646829306, 0.19129440976119394, 0.82659336030485053], [-0.24708022792929341, 0.63592279157218234, -0.87762533114486296, 0.72977589944455556, -0.80110159202378672], [-0.27477607673887516, 0.28685774399108177, 0.077438162163678825, 0.12172184450223011, -0.89554832988726352], [0.73186437335660726, -0.62884815586546106, -0.43221594485264236, 0.92730356568725458, -0.46232789830798082]])
62242          res=generalTensorProduct(arg0,arg1,offset=0)
62243          ref=numarray.array([[[[-0.84409719422465679, -0.89061788644447126, 0.26570510076488563, 0.18409964302660339, 0.7955043890213771], [-0.23778730291961886, 0.61200512376221772, -0.84461699835647852, 0.70232832598130468, -0.77097139066288156], [-0.26444148421811031, 0.27606874834503436, 0.074525638406091804, 0.11714376886065271, -0.86186589587816431], [0.70433825038086806, -0.6051965719086817, -0.41595988746932699, 0.89242678671811138, -0.44493930139408289]], [[0.14264259519314601, 0.15050405038316267, -0.044901067541130012, -0.031110695587097573, -0.13443097704142634], [0.040183284845045616, -0.1034217383048318, 0.14273043603761565, -0.11868530754642891, 0.13028518603812914], [0.044687531061214807, -0.046652403283760302, -0.012593964940773878, -0.019795932642967955, 0.14564529883250257], [-0.11902496136172099, 0.10227117233619644, 0.070292376578001178, -0.15080973346236617, 0.075189560027592625]], [[0.81681913242935422, 0.86183645000722586, -0.25711850646320783, -0.17815023166339458, -0.76979666480356124], [0.23010290734579189, -0.59222740894542791, 0.81732213843730295, -0.67963170335562806, 0.74605648112307421], [0.25589572527340837, -0.26714723974551235, -0.072117248728119837, -0.11335812072939608, 0.83401361615506486], [-0.68157667452190229, 0.58563888400285435, 0.40251762087681947, -0.86358689339487771, 0.43056052861574773]], [[0.32108382446173489, 0.33877970341589453, -0.10107083700348597, -0.07002915999420968, -0.30259974011369412], [0.090451262191438814, -0.23279895617737403, 0.32128155133460956, -0.26715675218068169, 0.29326769992643253], [0.10059017335921876, -0.10501303657857675, -0.02834860388543313, -0.04455999803694307, 0.32784281231486745], [-0.26792130182911822, 0.23020906974825561, 0.15822584461260261, -0.33946778604654915, 0.16924924466331265]], [[0.67146803043977332, 0.70847461900950126, -0.21136485455597273, -0.1464488041821852, -0.63281310370072563], [0.18915661969672048, -0.4868418920040784, 0.67188152767563292, -0.55869279153558649, 0.61329743157046512], [0.21035966449053992, -0.21960899761962363, -0.05928414876887577, -0.093186301640779512, 0.68560279499578136], [-0.56029165951801985, 0.48142578005095171, 0.33089052811925579, -0.7099135749879284, 0.35394326437343626]]], [[[-0.26910088210119371, -0.28393182739749845, 0.084707634954639052, 0.058691554328029659, 0.25360934056611573], [-0.075807351814396087, 0.19510918858833501, -0.26926659731900288, 0.2239045140054359, -0.24578814231545412], [-0.084304789962733537, 0.088011598911260938, 0.023759011606069004, 0.037345807744350826, -0.27476560095284669], [0.22454528432499138, -0.19293860050659023, -0.13260934096520355, 0.2845085105835109, -0.14184807070306343]], [[0.090908166754394823, 0.095918384623598141, -0.028616092759335368, -0.019827291409326358, -0.085674785019793462], [0.025609382348143646, -0.065912153512871538, 0.090964148981345208, -0.07563984457179751, 0.083032613098101435], [0.028480002905543852, -0.029732244085090388, -0.0080263140430431971, -0.012616231100737646, 0.092821832744494334], [-0.075856310807829799, 0.065178881359508056, 0.044798337290926513, -0.096113200823489925, 0.047919382369077994]], [[0.80531487346146391, 0.8496981573115564, -0.25349719329074033, -0.17564112491151204, -0.75895468053443749], [0.22686208776863856, -0.58388634883812196, 0.80581079502299358, -0.67005962208601144, 0.73554885878324727], [0.25229163401814386, -0.26338467970428409, -0.071101533654266816, -0.11176156021164017, 0.82226718632492835], [-0.67197719985380422, 0.57739061811907533, 0.39684847483718932, -0.85142394707242519, 0.42449642014192268]], [[0.43084698292557133, 0.45459223409291688, -0.13562210820714737, -0.093968770774726734, -0.40604407674726817], [0.12137221014581359, -0.31238175285032838, 0.43111230313210669, -0.35848483129974273, 0.39352185964099667], [0.13497712871843687, -0.14091195672525839, -0.038039631783589219, -0.059792923999116884, 0.43991654452380685], [-0.35951074380056058, 0.30890650847769091, 0.21231567141842853, -0.45551553917039317, 0.22710744319762641]], [[-0.06392507172403504, -0.06744817144187619, 0.020122348160911727, 0.013942213012157763, 0.06024504698382132], [-0.018008080702322349, 0.046348301711762643, -0.063964437470819285, 0.053188648083845151, -0.058387116771041747], [-0.0200266520977842, 0.020907206728641197, 0.0056439670845783701, 0.0088715184432279475, -0.065270728995987931], [0.053340863447527281, -0.045832677245111163, -0.031501426402942477, 0.067585162869552115, -0.033696092048481251]]], [[[-0.62729912382203146, -0.66187143334841181, 0.19746135639978957, 0.13681545864231429, 0.59118690317181199], [-0.1767139706162569, 0.45481762116656821, -0.62768542137008854, 0.52194219639380612, -0.57295496438525129], [-0.19652228734700439, 0.20516320293015172, 0.055384460455837538, 0.087056542860560887, -0.64050410904762356], [0.52343589146046576, -0.44975777895711372, -0.30912467751334888, 0.66321573536066791, -0.33066101371758588]], [[-0.38757584821425606, -0.40893629920256974, 0.12200121088946128, 0.084531231462649598, 0.36526396538532352], [-0.10918246886047928, 0.28100840350676703, -0.38781452159058577, 0.32248122435371473, -0.35399938861254232], [-0.12142100844561372, 0.12675978552867603, 0.034219208068191238, 0.053787757961790403, -0.39573452906539897], [0.32340410167084982, -0.27788218738165732, -0.19099223088534895, 0.409766874239056, -0.20429842478042068]], [[-0.75972929175992143, -0.80160021941394022, 0.2391477538395643, 0.16569879910373259, 0.715993359767367], [-0.21402035271846051, 0.5508349303973209, -0.76019714122989324, 0.63213028704689123, -0.6939124458688587], [-0.23801043634732982, 0.24847555008149833, 0.067076766599400484, 0.10543519533001182, -0.77572200351761467], [0.63393931857906427, -0.5447068964303925, -0.37438450556382297, 0.8032283192739561, -0.40046741374940892]], [[0.64983046381463982, 0.68564454210919956, -0.20455377656664361, -0.14172959848063038, -0.61242116384379131], [0.18306118584770728, -0.47115376777983942, 0.65023063640422496, -0.54068932457690555, 0.59353436998741715], [0.20358097801655592, -0.21253225814423682, -0.05737376039497101, -0.090183441163592573, 0.66350974591139977], [-0.54223667020693145, 0.46591218607673546, 0.32022782263926913, -0.68703712878269729, 0.34253770131277711]], [[0.2018721029839991, 0.21299787147954727, -0.063545345052653912, -0.044028794729641739, -0.19025077330372642], [0.056868596687339262, -0.14636556336897324, 0.20199641799647464, -0.16796702692669144, 0.18438352483397927], [0.063243141785769202, -0.066023888217948259, -0.01782335903282093, -0.028015800944692547, 0.20612161973945239], [-0.16844771525044711, 0.14473724770775201, 0.099479891433061449, -0.21343048339299345, 0.10641053315567479]]], [[[0.55401886085995822, 0.58455247841772329, -0.17439417907988389, -0.12083285575662964, -0.52212522258120586], [0.15607047576019634, -0.40168642169062813, 0.55436003163383651, -0.46096959185755071, 0.50602311503121278], [0.17356481084527994, -0.18119630597473993, -0.048914520243761341, -0.07688671141791277, 0.56568125698731286], [-0.46228879542069434, 0.39721766362839245, 0.27301313710783248, -0.58573974082763092, 0.29203362669224564]], [[-0.83995181120966, -0.88624403911435357, 0.26440021618613696, 0.18319552494815097, 0.79159764652161824], [-0.23661952336360417, 0.60899955087026503, -0.84046906257003073, 0.69887917352185558, -0.76718513034858438], [-0.26314280529269907, 0.27471296762666325, 0.074159641080494498, 0.1165684728010636, -0.85763325031267323], [0.70087922713103556, -0.60222443598986841, -0.41391709777137137, 0.88804405583225932, -0.44275419304954228]], [[0.80337129553124498, 0.84764746305478689, -0.2528853934016676, -0.17521722585628965, -0.75712299007927086], [0.22631457006901468, -0.58247717503697238, 0.80386602021657894, -0.66844247438846616, 0.7337736568397093], [0.25168274367224863, -0.26274901697471009, -0.070929934474655038, -0.1114918305580197, 0.82028269502997042], [-0.67035542420022354, 0.57599712136460934, 0.39589070544443078, -0.84936908772818243, 0.42347192413317697]], [[-0.27076262761433806, -0.28568515661935973, 0.085230719573373262, 0.059053985050302044, 0.25517542307200203], [-0.076275475611528643, 0.19631402231529388, -0.27092936615290897, 0.22528716395669612, -0.24730592753967051], [-0.084825386942435993, 0.088555086091434684, 0.023905727702370327, 0.037576424708402952, -0.27646232710619356], [0.22593189114623718, -0.19413003046847199, -0.13342822708564031, 0.28626540092598013, -0.14272400761266585]], [[0.12055663322146748, 0.12720086574294209, -0.037948843565827457, -0.026293693774148787, -0.11361645496453697], [0.033961535305343973, -0.087408509043596663, 0.12063087329298507, -0.10030875469755483, 0.110112574481147], [0.037768369850709735, -0.039429012518769159, -0.010643987583884415, -0.016730843880705254, 0.12309441543744941], [-0.10059581846260338, 0.086436090115785832, 0.059408707826051566, -0.12745921860599571, 0.063547639455493812]]]])
62244          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
62245          self.failUnlessEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
62246          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62247       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62248       def test_generalTensorProduct_array_rank3_array_rank3_offset1(self):
62249          arg0=numarray.array([[[0.56691575903189695, -0.26202499027874815, -0.3051127616078555], [-0.58907833805541987, -0.30528083256776717, 0.2856035968325199], [-0.73732003256355894, -0.89445192385585837, 0.19444477125835746], [0.043725136580019752, 0.20800688396092926, 0.40600342514535637], [0.4119307137126631, -0.41188998031756485, -0.41430584234650847]], [[0.88403904797800048, 0.2700028481980592, -0.28213461466419165], [0.77552222084905109, 0.6174832534049941, 0.45555015756405659], [0.42093546631990542, 0.76578762584374105, 0.33614713111922856], [-0.23974404601627186, -0.77134236452494065, -0.54964084898634225], [-0.82378233554243185, -0.24451078585668173, -0.86129978649563754]], [[0.68069225832592362, 0.55319946077971949, 0.68042283391202085], [-0.57353969185481524, 0.91093587603846204, -0.75471370807849825], [0.74088507621827704, -0.85198485196749019, -0.76990948443504448], [-0.96421572202406369, -0.69005819366898158, 0.74963025425883711], [0.071145156464561987, -0.47229097264107156, 0.90818690700584392]], [[-0.17912383463065229, 0.841326225967997, 0.059765915118526802], [0.52552072453298315, 0.15718243997203807, 0.7736159998431158], [-0.35019997909366185, 0.17180624735045869, -0.97366325725652025], [-0.7564014878049472, 0.26198919432106971, -0.40720111939247738], [0.75948796941582231, 0.7319657022981052, -0.37540563370467872]]])
62250          arg1=numarray.array([[[0.011065684731264014, -0.51680683264041916, 0.64556639033434693, -0.73741523555867206, 0.95330673951811762], [0.7675401170408489, -0.3960270987893395, 0.54542171269408235, -0.59680970995703642, 0.97477387622303957], [-0.6580294248237526, -0.89410251530785789, -0.2629878257505498, -0.26247026356141689, 0.61251078978450346], [0.067061235697280397, 0.60990216119291274, 0.39340892221222856, 0.29350774913793543, 0.74460083148615208]], [[0.16603989860021628, -0.87186091940860333, 0.2929908377505348, -0.55236826757651758, -0.70877177644018619], [-0.98919373111426889, -0.879879982558748, -0.45033650812338255, 0.58851977832926017, -0.49995849766225908], [-0.48486037580079233, -0.80111165384966765, -0.021439470952025808, 0.4324397600910741, -0.41094651860471454], [-0.11662108760273449, 0.8065792264747178, 0.50811329874228273, 0.75643633088791185, -0.76631332253494233]], [[-0.96857510097960953, 0.88615534903593263, 0.40220533685305182, 0.8467256621198378, 0.40933331391092875], [0.97014402292632429, 0.35612986103046063, -0.52695701983013454, -0.31035249030379664, -0.61480248010561178], [-0.69986694135230509, -0.22018846860364993, -0.59178548162641476, 0.56866237128401953, -0.80582079569059251], [-0.39397276743265408, -0.66567564485350617, 0.74583286911868107, 0.17171581144746129, 0.80091654618320551]]])
62251          res=generalTensorProduct(arg0,arg1,offset=1)
62252          ref=numarray.array([[[[0.25829133212652239, -0.33491389462468057, 0.16649285770787964, -0.53166483314002733, 0.60126771383026867], [0.39832074382625332, -0.10262322482096303, 0.58798889497665541, -0.39785521352500841, 0.87120037496156166], [-0.032463380349482596, -0.22978722107606731, 0.037087036894735109, -0.43561469914916939, 0.70078648518259035], [0.18878182975201069, 0.33752536700813968, -0.13767179081229425, -0.08420373930558947, 0.37854932722206358]], [[-0.33383588629727756, 0.82369129246490047, -0.35486237233533757, 0.84485068066124558, -0.22829084500383223], [0.1269172516614232, 0.60361344806474571, -0.33431783215723537, 0.08326607664917976, -0.59718022822935968], [0.33576494341593377, 0.70837383782144414, -0.0075505712417800463, 0.18501199527374476, -0.46550806039847165], [-0.1164221779870033, -0.79563268777596574, -0.17385337489553884, -0.35478191656412106, 0.024057195137295428]], [[-0.34500802172270939, 1.3331979815139283, -0.65984852571808306, 1.2024192627952013, 0.010662845378936192], [0.50750296439648768, 1.1482566459036774, -0.10181003607484021, -0.14670931216064315, -0.39107659368999226], [0.78277710555278712, 1.3329810592997686, 0.098013175676841091, -0.082698567381600918, -0.2407322115948719], [-0.021739580965107315, -1.3005765707096244, -0.59952789530034978, -0.85961583291085397, 0.29215535091915845]], [[-0.35822351801098529, 0.15583158448328327, 0.25246833415251146, 0.19663353495064531, 0.060444786205243933], [0.22168348699787385, -0.055747489040687992, -0.2837708098627576, -0.029683594906239605, -0.31098460104676456], [-0.41377509773557852, -0.29512876585102388, -0.25622566863794571, 0.3093527693675317, -0.38586358997323256], [-0.18128002033794333, -0.075824504981135271, 0.42570362227419184, 0.23989483812046686, 0.1983341877020588]], [[0.33745444792990698, -0.22091716881848142, -0.021387387356124249, -0.42705241810710065, 0.51504313522402867], [0.32167599803873137, 0.051731341185124069, 0.62848642283280698, -0.35966879976613503, 0.86218345369960103], [0.21860556270121506, 0.052886945033081167, 0.14567812296294941, -0.52183731001523892, 0.75543302379122979], [0.23888485943330801, 0.19480883960845113, -0.3562324736001673, -0.26180655276428066, 0.2905363269654489]]], [[[0.32788230581983935, -0.94229744972172846, 0.53633821007743299, -1.0399354867161117, 0.53590288728388358], [0.13773909945611018, -0.68815008186277893, 0.50925476753009113, -0.28113989118272048, 0.90020501199959468], [-0.51518069889265772, -0.94460117594857296, -0.071317056504695248, -0.27571333401893677, 0.65787666467755368], [0.13895008007715542, 0.94476615593835001, 0.27455561779358983, 0.41526530064781347, 0.22538314935851905]], [[-0.33012599868318099, -0.53546649075280484, 0.86479272102616533, -0.52723404731699364, 0.48812771299187618], [0.42638311532591078, -0.68820395510012844, -0.095143947648366506, -0.24081921013251331, 0.16716943492728065], [-1.1285340986268984, -1.288376290264202, -0.48677938635610274, 0.32252702109791087, -0.14582865574105358], [-0.19947844642762175, 0.66779319854188623, 0.95861309490505509, 0.77293371299939306, 0.46912650576314324]], [[-0.19377450256091402, -0.58732405033027635, 0.63131071769479352, -0.44877660810352155, -0.0038918198575282614], [-0.10831633168453247, -0.72079102328402689, -0.29240987285171888, 0.095138690992506852, -0.17920922469326603], [-0.8835462633413651, -1.0638565726828566, -0.32604597651519368, 0.41182819909582785, -0.32774459257474825], [-0.19351134878997889, 0.65063288325476354, 0.80541622407796787, 0.76053918057036174, -0.0041785624272440702]], [[0.40164190078827883, 0.30933744580169081, -0.60183542678026614, 0.13746094598182396, 0.09316977294486628], [0.045763073991502146, 0.5778903260746997, 0.50623912258013914, -0.14028625656368349, 0.4898634938386251], [0.91642744526199671, 0.95331168872243266, 0.40485641215569251, -0.58319349265721088, 0.61304667065652119], [0.29042077985722936, -0.40248661293735177, -0.89618697143281167, -0.74822014778347123, -0.027640136247850444]], [[0.78451926597612875, -0.12432967474747814, -0.94986497952345594, 0.013245012196330008, -0.96457360419518412], [-1.2260022934956312, 0.23464570110352151, 0.11467132983459005, 0.61504839688837076, -0.15122701036968811], [1.263421855116867, 1.1220745793135234, 0.73159161618289437, -0.37930659782351078, 0.28995856653754054], [0.31259991288497885, -0.12629765653321134, -1.0907081936762757, -0.57464213253822249, -1.1158463895314539]]], [[[-0.55965510676196195, -0.23113906664269912, 0.87518411270908802, -0.23139119522592044, 0.53533608632318863], [0.63534532234752494, -0.51400282285250731, -0.2364151648922021, -0.29184584619571013, -0.03138138596522444], [-1.1923454812709127, -1.2016044570558235, -0.59353843526866468, 0.44749482786327455, -0.35870290918305481], [-0.28693472570515632, 0.40841396388476786, 1.0563601250159111, 0.73508798201082604, 0.62788181080202854]], [[0.87590199709062067, -1.1665937482686306, -0.40691196431198862, -0.71927062893298033, -1.5013343558909948], [-2.0734877731510664, -0.84315307049084476, -0.32534699613496948, 1.1126251157516212, -0.55050178115156578], [0.46392845682793865, -0.050778809471897557, 0.57793258851434481, 0.11528471890001807, -0.11748117579848238], [0.15264003513386964, 0.88733339097593822, -0.32566728936132755, 0.39113037095390635, -1.72958312566007]], [[0.61245007887775993, -0.32234158113795625, -0.080994954755456233, -0.72763266429929296, 0.99500395272115338], [0.66451400816600792, 0.18204609172054387, 1.1934838978463613, -0.70463401786619351, 1.6214947446892589], [0.46440371092680954, 0.18963297395490289, 0.27904360421478541, -1.0007109793026716, 1.4243293853511836], [0.4523674390338972, 0.27718411884311656, -0.71565783403137351, -0.55922241616451496, 0.58791774130105046]], [[-0.85132009891401605, 1.7642369040696644, -0.52314070250098199, 1.7269247861320425, -0.12325093819733579], [0.66977630172036773, 1.2559896646836712, -0.61016871793285088, -0.063309205991461198, -1.0557663785468505], [0.44442275888298921, 1.2498614254395517, -0.17524882217031917, 0.38095587294369637, -0.91108316905726594], [-0.2795200665644223, -1.6436744596961788, -0.17085992977882503, -0.67626650697717372, 0.41123623293722567]], [[-0.95727910049707221, 1.1797984242326987, 0.27282961497029379, 0.97740018419969432, 0.77432082511243205], [1.4028661306497732, 0.71081643984418108, -0.22708148543838103, -0.60227076697066351, -0.25287923774410448], [-0.45343042068769024, 0.11477445458431879, -0.54603646759171276, 0.29354083723658569, -0.49417238908849348], [-0.2979507400984498, -0.94210640766630971, 0.465367461798677, -0.18042634403764696, 1.1422795279554929]]], [[[0.079823816096485145, -0.58798514989684447, 0.15490271844508047, -0.28202793114536451, -0.7426040624123984], [-0.91173781221982519, -0.64804378543262064, -0.50807201198191332, 0.58349146720927025, -0.63197766342632544], [-0.33188518443079706, -0.5270009385421105, -0.0062988022364628971, 0.44482421841482928, -0.50361598226722903], [-0.13367478817164974, 0.52956352860497868, 0.40159551321878212, 0.5940982425430853, -0.73022774144608205]], [[-0.71739139211536829, 0.27691002859906033, 0.69646401576154005, 0.1806909387604041, 0.70624277215985176], [0.99839329244182373, -0.0709143719165376, -0.19181695929454423, -0.46122454854551775, -0.041941858211682337], [-0.96344790060293528, -0.76613140838621085, -0.59939017814879059, 0.36996468249092285, -0.36610232301303436], [-0.2878723543182507, -0.067681013072169005, 0.86359927067637154, 0.40598501231727047, 0.8904540252977583]], [[0.96771747704477773, -0.83162231436659118, -0.567352238422971, -0.66108318531408594, -0.85417222711331897], [-1.3833357851569823, -0.35923075670288551, 0.24470139047371298, 0.61229293916298977, 0.17134880096033506], [0.82857457492426856, 0.38986811676272615, 0.66461467566777699, -0.38747272350531892, 0.4994936556967563], [0.34007573324670587, 0.57313154263691923, -0.77666481796327935, -0.14001929653891237, -1.172239625006346]], [[0.42953542419969298, -0.19834813280197497, -0.57532540799224252, 0.068279826482183725, -1.0734541664022277], [-1.2347702872292821, -0.075980039055161014, -0.31596360555298053, 0.73198945657238779, -0.61795587614073388], [0.65569285868630733, 0.55607886696843678, 0.43428318350940531, 0.080267488057836178, -0.24283648997293328], [0.079147468671380464, 0.021048007295107918, -0.46815887950058876, -0.093754423884499255, -1.0901171008711159]], [[0.49354831498898033, -1.3633485724491097, 0.55376900187839206, -1.282238210536691, 0.051562336610748494], [-0.50531593087886506, -1.0785129426261126, 0.28243298457478117, 0.094014571412508616, 0.60517687367822071], [-0.5919326045374862, -1.1827863665393967, 0.0067305565745261753, -0.09629099266349167, 0.46690548533988818], [0.11346916185678046, 1.3035000712103573, 0.39072099017265743, 0.71213797156920411, -0.2960682793434018]]]])
62253          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
62254          self.failUnlessEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
62255          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62256       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62257       def test_generalTensorProduct_array_rank4_array_rank4_offset2(self):
62258          arg0=numarray.array([[[[-0.98240418969108201, -0.54304709924260042, -0.35442264599619322], [-0.79619763071978289, -0.84638748001014963, -0.51890495617446897]], [[0.59796663406131301, 0.46009667464135395, -0.25201961444919996], [-0.89789107699939374, 0.4099834945608809, 0.66896327448551318]], [[0.90446667619460697, -0.68665486543187182, -0.2669972149453006], [0.70197673515613457, -0.73039125927738402, -0.10429682595380352]], [[0.88753765017061759, 0.80640591428591546, 0.90571411852263495], [-0.82462795534998801, -0.71198022946671879, 0.53435725126666567]], [[0.33416352730471655, 0.4171576843359559, 0.36703573480924723], [0.58200156962842109, 0.99088109249276335, 0.0049604765696549258]]], [[[-0.78236466161246065, 0.074274434753403673, 0.47705516237888146], [-0.59988417082895662, 0.93188455244788204, 0.60417553677870162]], [[0.71172927489698079, -0.021333171670943285, 0.76483884282722614], [-0.68053969742507658, -0.6726405562037483, 0.99822429558864711]], [[-0.48765919381146428, -0.61934727842229287, 0.69387244085238264], [0.40145438796207422, -0.66882425539747525, 0.63626724578997873]], [[0.69938818106470313, 0.22189731061792117, 0.74870478955311737], [0.94780428825292273, -0.9314599222455533, -0.79669183680919109]], [[-0.39947826253557617, -0.91087142708365043, -0.67451335258312284], [0.86348107284809505, 0.10364645649765603, -0.41828571647993096]]], [[[0.032582643279688961, -0.60257416888695503, 0.7896569671912943], [0.40294328743212171, 0.57220118645155726, -0.8231027587904669]], [[-0.51570698561686057, 0.93921561000793941, -0.82983099969223639], [-0.079258006847544582, 0.83710488958068807, 0.86281944365513552]], [[-0.25364071889194384, -0.59054308533935029, -0.78307162739293679], [-0.50270810942884148, -0.20588515836091781, -0.82746133740593364]], [[-0.64083575957526806, -0.099765189126220122, -0.4863198210966988], [-0.61685248081350563, 0.11331078186975807, -0.75842713616582058]], [[0.97185986677666536, 0.51097072708968949, 0.33179510908752663], [-0.59456654355568861, 0.29015678725738714, 0.97118978891137853]]], [[[-0.27126728826548607, -0.78565993759639063, 0.42494085771226509], [-0.74895851053325879, 0.23336078961517792, -0.73120060403589848]], [[-0.41030921680830512, -0.56131269394118699, 0.031998737270264144], [-0.76027446472230564, 0.75617560446964616, -0.68532601001324833]], [[-0.17014320789203841, 0.54613288702020446, 0.56892119529577023], [-0.93640812995754308, 0.56346692917420427, 0.48905097746390136]], [[-0.98645324083790942, -0.54696998047559542, -0.25262090227474343], [-0.82259645582575014, 0.98597010214749137, 0.84752503984794303]], [[0.028294811022137711, -0.52436403785051033, 0.68800858181502234], [0.020605420785341666, -0.75050022985887455, 0.071743459973619084]]]])
62259          arg1=numarray.array([[[[0.70588742170393592, 0.6352875103317146, -0.43597723415983425, 0.14609486197056842, -0.73960430685474976], [-0.35476093468368997, -0.13315313367321902, 0.40421087122449029, 0.64525267803802699, 0.15313273899919877], [0.95490546616054117, 0.58014509836148398, -0.64540703440579472, 0.47530122831441979, -0.57784158580192679], [-0.27554037762729555, -0.035350828803423218, 0.82463324502631341, -0.34464283726544886, -0.41312839116067068]], [[0.40392236920967961, 0.34962319910119932, -0.19831980450633813, 0.69153830537463645, -0.29094430102867608], [0.1454391606554748, 0.53670650142494258, -0.021270035270837484, -0.17748171951267611, -0.83988713541259208], [0.7755147424728579, -0.14033826449734343, -0.82514758015580969, -0.10897020980250027, -0.45269765011114571], [-0.67325881191588111, 0.86123443917932496, 0.80700744540142444, 0.22140146772376612, 0.076582714074661551]], [[-0.35821059577153735, 0.44880312117823018, -0.8190765290166877, -0.16501902040192018, 0.022193926023702959], [0.75203594986685451, 0.72574031059158051, -0.026138511002685938, 0.28723851832302061, -0.46838969641038686], [-0.91039438274501872, -0.27152275703511375, 0.88480953637185844, -0.54508875945875035, -0.26355516233742038], [-0.16869289225885686, 0.841191332374984, 0.6834197871904244, 0.44105453660826566, 0.8787198966744949]]], [[[0.58661320005716111, 0.98820921926785998, -0.13831428765093645, -0.53680910804473458, 0.47482186565229445], [0.45349291095393207, 0.807044179849286, 0.45514661800018175, 0.10545023045245139, -0.34301255276861387], [0.15431234000079574, 0.70025861211492879, 0.9173994174786837, -0.19934772087428843, 0.68180335483184962], [-0.81574574350218998, 0.77911592229379423, -0.850540404385139, -0.53637737383063167, -0.89732713772797168]], [[0.17046962455804593, 0.082972356361531219, 0.6533251633703554, -0.17709907059905072, -0.84097783216607191], [-0.010183766789225945, -0.93465327049975788, -0.97069535102111337, -0.55097607773903867, -0.20136579396133225], [0.53827383770945847, -0.75552501537178451, -0.47035263982328002, 0.95260668360540213, -0.44742355628448816], [0.10726623394749479, 0.87447955348625461, 0.88624196456455606, -0.1189192682403748, -0.43832376648280014]], [[0.34557852528408795, -0.19517322725412711, 0.41240586807371771, 0.53405540377539262, 0.96306788331063364], [-0.052607321547303743, -0.56303419699957802, -0.34741242414042972, -0.24547600170055706, -0.14491554420950425], [-0.41470507650112332, -0.18283412520621312, 0.83380934845575339, -0.8093786625686783, 0.024649110600003965], [-0.36392401924025775, 0.85070635348781387, -0.92206227741702862, 0.66074270929988166, 0.14153915931628935]]]])
62260          res=generalTensorProduct(arg0,arg1,offset=2)
62261          ref=numarray.array([[[[-1.5765234897732763, -1.7287972133605805, 0.16946194726677913, -0.16039901723083899, 0.71072116437889199], [-0.3221526256323583, 0.022807884199776529, 0.26318801962648369, -0.12956309281743605, 0.99040460661414631], [-1.3998386130088432, -0.2206966740990251, 0.0035495769210489025, -0.44213374919350018, 0.72997299350919043], [1.443639855555586, -2.533013859503976, -1.085028819077944, 0.24687893394224197, 1.0648289286768522]], [[0.47257087698443501, -0.55621664883667798, 0.52240530743044278, 1.213774221438614, -0.70858281003770673], [-0.78130171857467301, -1.5000644298041865, -0.80054155295972795, -0.25299726626159236, -0.048329537313933538], [0.96195585286524521, -0.7100507570695116, -1.4473426258082287, 0.39955145996380237, -1.2665256731043566], [0.10096223103227464, 0.39116802671842682, 1.2023808336318513, 0.65949289454913185, 0.28742482908230016]], [[0.70797417335763946, 0.86815027441213299, -0.65674749303390834, -0.6018267643149362, 0.37201699179799019], [-0.2902610709220747, 0.6251761529237535, 1.451903095888204, 1.1308404343932585, 0.76167800706366773], [0.33266755627329625, 1.7560448214970303, 0.64717159976961525, -0.10104120440785283, 0.66141060361984116], [-0.35490485153578749, -1.0284571508794822, -1.1389482702795601, -0.94008490039834824, -0.98537953295273506]], [[0.20734440170568602, 0.27399526841656896, -1.4194463551303813, 1.3920004249910944, -0.14911400889134308], [0.088725495362105417, 0.67102017551357274, 0.44807299188500549, 0.86387470357767726, -0.61681651063255283], [-0.083754082032539562, 0.018576322024338676, -0.41292179614279895, -1.1060678507348523, -1.347125806392115], [-0.53841001317523685, 0.61449640547202455, 1.5793335527835197, 1.1521778828176013, 1.6186301435218677]], [[0.78494422686673182, 1.1792516064311638, 0.039865472274441038, -0.20852647962402884, -0.91255715725503006], [0.47172869229215697, -0.013453243623864689, -0.58206515074895848, -0.23878840775093962, -0.87099200488783068], [0.92957749936412215, -0.30632919330495534, -0.16313097150863751, 0.73718788226328735, -0.52508469686341974], [-0.80512940773281927, 1.9803767394184075, 1.2416218821841054, -0.28765469582874104, -0.73945420333139567]]], [[[-0.67739835440588614, -0.89036388698115965, 0.87658011928902246, 0.33799159269394208, 0.080947960177543576], [0.33380009168895608, -1.2050374214169581, -1.717798975076108, -1.1059912442693114, -0.475071807138775], [-0.96530683083541358, -1.8284399552277144, 0.3808787055660286, -0.12169178470759828, -0.51832912715597801], [0.45453003718828411, 1.3544302540926383, 0.51981850004870267, 1.1066380373567566, 0.96344275132359691]], [[0.050896947227051181, -0.13519662508715641, -0.86617959559424862, 0.98056533273591295, 0.70068193181306726], [-0.034693936067514752, -0.033718576794290356, 0.26453891583846117, 0.73652832320411876, -0.007113882173516356], [-0.91426416995130566, 0.057362475902372478, 0.75936492508264763, -1.3893338744086363, -0.74162019954380376], [-0.1910523394278259, 0.3306087465592481, 0.15468484647477954, 1.1919054931997506, 1.4231986949669873]], [[-0.50158865150770859, 0.0021148162712845558, -0.46298374051696717, -0.37130327747860636, 1.9221243981505745], [0.76013765688131829, 0.82696682675268085, 0.40881765450180119, 0.24921759414162126, 0.02527194012215217], [-2.1396034369509715, 0.28570685614397356, 2.6531393882572152, -1.7746532845119769, 0.96793725275350873], [-0.19648043829432188, 0.33669839172940652, -1.9486230178012314, 0.6215934240931873, 0.78673646310092826]], [[0.43701391185867922, 1.8727504983319172, -2.0303719457149914, -0.63722988965364613, -0.099106544449251155], [0.8284299913174098, 2.653409993537208, 1.8707448888188363, 1.4356832768264736, -0.45204664841438968], [0.13358713771779629, 1.6844273955263194, 0.67131369085991466, -0.53130289868611036, 0.34142253012905927], [-1.0515513960306078, 0.042341581444289567, 0.37044597044767591, -0.7857116582247976, -0.16901440090521408]], [[-0.028642788946772191, 0.068568889715193121, 0.68306491159136495, -1.2822246148875851, 0.46549637677546485], [-0.085483458701379328, -0.08969732718341128, 0.31325059682197054, -0.15322094226987698, 0.76335150172072996], [-0.11128385857631001, 0.68204995457588524, 0.80724969593433893, 0.54220784531967403, 1.3529960387011659], [0.29607118884601102, -0.93019649789228775, -1.7823630725955661, -1.1133446317349842, -1.3768890110818413]]], [[[-0.45378886536901181, 0.77074272327294691, -0.56284417502393502, -1.2994737832512686, -0.9138432161094483], [0.71485948947648947, 0.499160263016178, -0.080732057141491342, 0.28406310604809704, 0.0070606072302248357], [-0.44356613176491599, -0.11059949307391601, 0.58909238877301928, 0.78167472598940879, 0.044261178320711636], [0.29572647647697836, 0.25824216907682229, 1.003595247921008, -0.62439294785551203, -0.094602890183577232]], [[0.70697241089108609, -0.54894756666182809, 1.6319625491110894, 1.0661886375027778, 0.17907607591477448], [-0.39436976697303394, -1.3616550706767427, -1.3551430053035505, -1.4191983528422385, -0.74553619013014005], [1.0719431827584209, -1.0513823923179859, -0.92341177952463427, 0.21975283277186441, -0.31578860313458856], [-0.50980374590566302, 1.5333547718254819, -0.22072170226490007, 0.53274366374887561, -0.61788800153189349]], [[-0.75301604819315959, -1.0714125994249493, 0.46286540704633466, -0.45180689407764218, -0.52042390747295375], [-0.767151640096978, -0.5988692904188333, 0.18902108196936357, -0.020231073188315823, 1.1577369544132734], [0.1674819914176085, 0.1031630133175617, -1.0961730391804927, 0.94445508917671162, 0.34925780033767467], [1.2887057437588569, -2.4339795695459241, -0.21281950403370886, -0.64132302060002022, -0.20432002467717797]], [[-0.92308427330933929, -1.1124100065050546, 0.54407686095527874, -0.17633955576182339, -0.62640606329010484], [-0.39388959842909393, -0.49787031780196161, -0.37146065532322953, -0.47678738302768231, 0.51212486690919556], [0.033763751846895118, -0.60462898298265122, -1.1859592721121268, 0.81613236332313532, 0.053672559422998783], [1.1171416751992804, -1.4990655707149942, 0.38306946983103923, -0.19945659055711662, 0.22627277751419606]], [[0.80986830944661237, 0.19193694312316756, -0.12448183137798657, 1.2270384533510348, -0.4510988551621693], [-0.34461920618334574, -0.91221831157518729, -0.51637686683870343, 0.17074114008785529, -0.43096794808241035], [0.68391274450628159, -0.41111661905215757, -0.62743986326104551, -0.16574169556112361, -1.3916040890442449], [-0.50507379439393107, 1.3015099463834616, 1.3078950006305294, 0.85063824587270809, 0.47298305098817217]]], [[[-1.3133033567134356, -0.83435730642877493, -0.11948007646309936, -0.68284988573329652, -0.81742410417431777], [-0.0020172452761388765, -0.48801508401809002, -0.41742548592641837, 0.058401855428047392, 0.73516147560274059], [-0.94191818048411435, -0.72958348725827005, -0.20718292826567963, 0.68847175489251944, -0.23265641323237704], [1.4341059776481424, -1.3110845671119922, 0.95072964042405883, -0.002196005847771576, 0.8915839320899549]], [[-1.0817371722576954, -0.9973624017945657, 0.58054838982853041, -0.54519149630654407, -1.1894499592734862], [-0.22843759539522368, -1.1578785445536142, -0.99671042926496678, -0.48451380632781704, 0.60144983322594892], [-0.28232626558388069, -1.1463509621628307, -0.86828072286684255, 1.2752889012694708, -0.39081590174738151], [1.4362768782796809, -0.95609301860557516, 1.1792423915814154, -0.10370612679114088, 0.4084061671082016]], [[-0.38755011925079541, -0.63588014543347138, 0.19921283976809195, 0.92299520516802369, -0.46792996899757749], [0.11151813714007938, -0.82906414641931914, -1.2383208606179283, -0.57254941348299104, -0.61435561844611442], [-0.30089098079728693, -1.500682566538718, -0.55375486155129761, -0.12288827638312705, -1.1773592816882219], [0.22955410749621766, 1.134143330892923, 1.5341250923265748, 1.1888764613461307, 1.2745410469519409]], [[-0.84834839405575047, -1.8277952031452123, 1.8529222076077554, 0.23890901874645987, 0.47957457773097079], [-0.34724435448600721, -2.4081476193184308, -2.0064172367525877, -1.4500328600285077, 0.38746049650696207], [-1.0838560346537858, -1.9028446990917485, 0.35274458468600717, 0.14569756528072464, -0.096899261547597149], [1.1510315465443757, 0.29360767634546248, -0.63552837288345188, 0.99142176695614259, 0.56958235761388631]], [[-0.52933845877769958, 0.0875151982069102, -0.9354590865912602, -0.31185189569884064, 0.85693515877672799], [0.44431932849577221, 0.89181138876436905, 0.717567794210064, 0.70701412096678828, 0.25614375493454405], [-1.4365396655181055, 0.47152711628038196, 1.454896134121858, -1.0815439310709873, 0.39130897513159146], [0.10575290281521875, -0.45306423472019802, -0.67843664138293924, 0.30320335946176247, 0.87334701224021649]]]])
62262          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
62263          self.failUnlessEqual(res.shape,(4, 5, 4, 5),"wrong shape of result.")
62264          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62265       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62266       def test_generalTensorProduct_array_rank2_Symbol_rank0_offset0(self):
62267          arg0=numarray.array([[0.67876633525186181, -0.7766915666267793, -0.98848920524144135, -0.43675423955218173, 0.35593281580065006], [-0.61512597053615559, -0.72627878801603307, 0.40864417122786634, 0.0079889064441724944, -0.91655553660671085], [0.072566114694826878, -0.94794958404274809, -0.65978594504545685, 0.30029035792900038, -0.61108433422247388], [0.53686032371257864, -0.4570165016567258, 0.24109209487185845, 0.77888657905385372, -0.025677679196495218]])
62268          arg1=Symbol(shape=())
62269          res=generalTensorProduct(arg0,arg1,offset=0)
62270          s1=numarray.array(-0.0116337448509)
62271          sub=res.substitute({arg1:s1})
62272          ref=numarray.array([[-0.0078965943576881515, 0.0090358315139674912, 0.011499831201629708, 0.0050810873854909228, -0.0041408315630806171], [0.0071562185923685741, 0.008449342110386086, -0.0047540620228649867, -9.2940899209066949e-05, 0.010662973254545386], [-0.00084421566317942906, 0.011028203592252718, 0.0076757813408566628, -0.0034935014053259143, 0.0071091992267151433], [-0.0062456960266338646, 0.0053168133729168763, -0.0028048039173037523, -0.0090613677284885896, 0.00029872756813481696]])
62273          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
62274          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
62275          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62276       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62277       def test_generalTensorProduct_array_rank3_Symbol_rank1_offset1(self):
62278          arg0=numarray.array([[[-0.70690454319102569, 0.49099418825880581, 0.10003063509787768], [0.61267580744655592, -0.62107912921319008, 0.28965095544508768], [0.62160563043681427, 0.2066421780053771, 0.51735454795202318], [-0.18347385363717561, 0.86719354570492957, 0.85312719898655831], [-0.75033333118896617, 0.044491518098130678, 0.79174896004812534]], [[-0.3377095083706545, -0.40420412478891454, -0.31501051823058823], [-0.44738275130453076, 0.18798454776288298, -0.092577940408266057], [0.27525652806446144, 0.55173412300041491, 0.21082341879296274], [-0.6944317822520556, -0.81269378381816337, -0.54021919362087312], [0.30081168237942535, -0.90873880490240544, -0.25084101008910231]], [[0.1608404859733279, -0.21082186558542615, -0.092462829185575357], [-0.23710652044804381, 0.61641412775711202, -0.93282906496598272], [-0.41202867749808414, -0.82887269254529228, -0.9302438998511231], [-0.7959177894204168, 0.55308519684956803, 0.53763815496881828], [-0.44684401384333361, -0.9526203901273822, 0.50520455659568686]], [[0.37798542690035886, 0.58440488625668485, -0.35108725443223143], [0.57927768887653186, -0.40451307446551188, 0.8490623167400313], [0.33870010715806043, 0.63618655757439924, 0.66436299858966752], [-0.26111240852588979, 0.030268759758270924, 0.91016145632168], [0.11837585074448431, 0.020098522879374636, 0.58199018257838953]]])
62279          arg1=Symbol(shape=(3,))
62280          res=generalTensorProduct(arg0,arg1,offset=1)
62281          s1=numarray.array([-0.45243483271226204, 0.82711902268858939, 0.67741792935860068])
62282          sub=res.substitute({arg1:s1})
62283          ref=numarray.array([[0.79370141758100043, -0.59468748834167484, 0.24014688351628324, 1.3782059008997007, 0.91262165722979827], [-0.39492714872303114, 0.29518317897535762, 0.47462971119127639, -0.72396352852590917, -1.0576570330380832], [-0.30978059207863479, -0.014792033798976534, -1.129324142050439, 1.1817739450740357, -0.24352802479211855], [0.074525824066050184, -0.021495826575021804, 0.82301368427395638, 0.75973190498320453, 0.35731709676200674]])
62284          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
62285          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
62286          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62287       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62288       def test_generalTensorProduct_array_rank4_Symbol_rank2_offset2(self):
62289          arg0=numarray.array([[[[-0.1287512734937406, 0.38965603798852699, -0.81615331910293243], [-0.32213335469744386, 0.91505495292377992, -0.95646267503485327]], [[0.96218756601327637, -0.055430826139494682, -0.46351896240875257], [0.47753619799966462, 0.73307155660329237, -0.066814879069004407]], [[0.46941579870534467, 0.49016480366044424, 0.79505467863241064], [0.26450570615544811, -0.5716249578295407, -0.89532541427436096]], [[-0.7669775352551127, 0.09221523427443401, 0.9663944257321071], [0.3315794010909161, 0.33892882989591966, 0.65480329661405312]], [[-0.98542054029597437, -0.41741044293863827, 0.26008562116618639], [0.50072883078344255, -0.85522766916717674, -0.27097293590845073]]], [[[0.99095942455659558, 0.13583444626736618, -0.80458855887089098], [-0.25918811076446446, 0.16371363657749316, 0.0086402800929850088]], [[0.92305974282631276, -0.35857716081830127, -0.19797389603406867], [-0.35983171701164762, -0.17043823512896417, -0.23999224694667043]], [[-0.017967447453594243, -0.77769114693675578, 0.073131206909697877], [0.51071625864906389, 0.21995094256327841, -0.64976516550440699]], [[0.24015280647666248, 0.45070955251702749, 0.68902073111408813], [0.31062789748501585, -0.69994695100587645, -0.55832602763185135]], [[-0.88503505674197624, 0.6776064007123499, -0.42043494917887547], [-0.89682537018064856, 0.52206040598701642, -0.14844972092883091]]], [[[0.71724995310622108, 0.75347713224935786, -0.48577044122018997], [-0.097024811722049575, -0.24123823723994908, -0.29921557743117488]], [[-0.29587129977965643, 0.7587016903803101, 0.72085697914065983], [-0.52617785771384584, -0.9440376952247731, 0.85724055152772993]], [[0.42160521150589658, -0.4763521096781691, 0.32773623527179496], [0.055301223282496759, -0.65157155457936011, -0.24859295314642149]], [[-0.34703794546474831, 0.96472883940009946, 0.98142934449415553], [0.7790977353875197, 0.96462516103134277, 0.93098721361548775]], [[0.77145904383937869, -0.20553321018703374, -0.97346905107835258], [0.71604444486105279, 0.16684419916274829, 0.79326096379683042]]], [[[-0.09948467783584003, -0.30637367097111157, -0.64277280540216619], [0.25577436775375428, 0.19804859823022314, 0.51430540421485449]], [[-0.15477604842138715, -0.10692827119007964, 0.86378256424568689], [0.65682549686934877, -0.0023985239975474748, 0.20709565355557635]], [[-0.96162955463668398, -0.56814981703345802, 0.97704358126962054], [-0.275321031133404, 0.55262621738368711, 0.41652366223331438]], [[-0.10154357179442952, 0.56136958348956512, -0.88699965088263344], [0.96549270303922485, -0.22028095391746616, -0.12567775696266925]], [[-0.60896683273321406, 0.0041452846005074484, -0.36483898435005946], [-0.89812605135651524, 0.25458244454785883, -0.99570388829572432]]]])
62290          arg1=Symbol(shape=(2, 3))
62291          res=generalTensorProduct(arg0,arg1,offset=2)
62292          s1=numarray.array([[0.48290454056878263, -0.90094742430234254, 0.33524097434874323], [-0.14934541173855642, 0.028913249802327234, -0.57338806754401994]])
62293          sub=res.substitute({arg1:s1})
62294          ref=numarray.array([[-0.063851576432814916, 0.34738295127822744, 0.50894386871511976, -0.54465972832525134, 0.043255850655711789], [0.12491587360067508, 0.88885993204573999, 1.0191528100604019, 0.19440214122757382, -0.94467169518056282], [-0.3162483077548861, -1.025011583954067, 0.85807609000837215, -1.3300220160723202, -0.32559133724435552], [-0.31486789599729431, 0.094260602440172467, 0.19330933301207692, -0.93065777673577743, 0.29230003044300756]])
62295          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
62296          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
62297          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62298       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62299       def test_generalTensorProduct_array_rank2_Symbol_rank1_offset0(self):
62300          arg0=numarray.array([[-0.90637033812215062, -0.28028659772407849, 0.57332829255036932, 0.7538162367042871, 0.5231216923174804], [0.85656133529090495, 0.81979190110554634, -0.74770789479698485, 0.3684984455808753, 0.03027427210207434], [-0.98450090479521313, -0.26694646573031844, -0.019200332829135691, 0.59326299611262523, -0.49225025339778616], [0.48736077345018858, 0.24139057600068825, 0.43108330401243888, 0.96306706415885235, -0.72743774903601444]])
62301          arg1=Symbol(shape=(2,))
62302          res=generalTensorProduct(arg0,arg1,offset=0)
62303          s1=numarray.array([-0.54724138375704956, -0.66388211664640151])
62304          sub=res.substitute({arg1:s1})
62305          ref=numarray.array([[[0.49600335803031059, 0.60172305853804797], [0.15338442558708021, 0.1860772597646797], [-0.31374896816233061, -0.3806224003916065], [-0.41251944047258571, -0.50044511878566689], [-0.28627383877714752, -0.34729113635937647]], [[-0.46874581039738089, -0.568655752310394], [-0.44862405435382152, -0.54424518251552756], [0.40917670299477243, 0.4963898998310472], [-0.20165759927200003, -0.24463952803314029], [-0.016567334557376603, -0.020098547843054215]], [[0.53875963745019972, 0.65359254451574356], [0.14608415329531327, 0.17722098470031988], [0.010507216706012122, 0.012746757598921993], [-0.32465806292452615, -0.39385669358723552], [0.26937970982416276, 0.32679614014544978]], [[-0.26670398405178714, -0.32355010184853855], [-0.13209891283652789, -0.16025488653383096], [-0.23590662380232794, -0.28618849631870213], [-0.52703015284112964, -0.63936300102621468], [0.39808404037958189, 0.48293291255852311]]])
62306          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
62307          self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
62308          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62309       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62310       def test_generalTensorProduct_array_rank3_Symbol_rank2_offset1(self):
62311          arg0=numarray.array([[[0.1044689188978043, -0.8698753269718027, -0.24163396534419501], [0.41555720963006904, 0.81433584048278829, -0.053943404943050943], [0.42046491695603905, 0.83752922044522538, 0.5274611560200273], [-0.93634520087735917, 0.5615605645723647, 0.75726700392937429], [0.93005015184468065, 0.92687883059822229, -0.31914513508847042]], [[0.91935214009090216, 0.6317588216132175, 0.060916702726154126], [0.98154875120279028, -0.94634017264802739, -0.9575703772466333], [-0.93515110553452963, 0.70808303614507495, 0.50227646628104639], [-0.10009230452929962, 0.29350049175982762, -0.8082984228233081], [0.12336705630956968, 0.49295465731328547, 0.019953103651263904]], [[0.26237030592398214, 0.95769230304405739, 0.85397371081885143], [-0.34748118225060587, -0.74759796912062315, -0.83128603405174784], [-0.25641332352049706, 0.84565148804380996, -0.0047639759982984753], [-0.26586562656601265, 0.28177938059564389, -0.25181257299313309], [0.57551084174926381, -0.2974468854262573, 0.56024996285115169]], [[-0.59801593013253274, 0.55703577540340965, 0.33710887966084968], [-0.68809797005484152, 0.53372297522163326, -0.73369645365460556], [-0.24921148723206099, 0.51877598789516988, 0.70826263286797064], [0.184985800191102, 0.025908261385670261, 0.053773084782423597], [-0.45753750157651307, 0.024754813209553639, 0.61196507737990991]]])
62312          arg1=Symbol(shape=(3, 2))
62313          res=generalTensorProduct(arg0,arg1,offset=1)
62314          s1=numarray.array([[-0.13090371004112678, 0.74190352340331067], [0.88916385389193997, -0.30969955953414363], [0.90053806047999818, 0.99245296727367838]])
62315          sub=res.substitute({arg1:s1})
62316          ref=numarray.array([[[-1.0047376497006202, 0.10709551872925069], [0.62110192454799151, 0.002567614589233741], [1.1646591382473221, 0.57604236210198545], [1.3038381754470056, -0.1170409780843441], [0.41499779674058968, 0.086216982708049728]], [[0.49624831190753782, 0.54687212557349152], [-1.8322684184219473, 0.070952049276232332], [1.2043356652272728, -0.41459913516593544], [-0.45383101159654393, -0.96735397459054417], [0.44013678678555179, -0.041338869567248721]], [[1.5862359618089426, 0.74558531325530586], [-1.3678552282680703, -0.85127904283062028], [0.78119804980561558, -0.45685986364950271], [0.058584030799892217, -0.53442573042128305], [0.16471089160233154, 1.0751144286984924]], [[0.87715795739179137, -0.28161915199011467], [-0.096079826644484667, -1.4039553012774335], [1.1317170226803905, 0.35736177620081577], [0.047246071467370726, 0.18258509735369721], [0.63300228542029136, 0.26023131765744612]]])
62317          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
62318          self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
62319          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62320       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62321       def test_generalTensorProduct_array_rank4_Symbol_rank3_offset2(self):
62322          arg0=numarray.array([[[[-0.94637847097933037, -0.21641917856105963, -0.64198418597564655], [0.81902031672259579, -0.68271201536549264, 0.80774920063460409]], [[-0.91350022796424168, -0.22494400084888411, 0.20838002243757336], [-0.19644053501694159, 0.50626968084934321, 0.50368339764158843]], [[0.85743538609473968, 0.091055028873159749, 0.61325968283449961], [0.43950799906927895, -0.27973375890552377, 0.78642880572711826]], [[-0.38265480982306821, -0.50090717733405521, 0.2301094797707699], [0.7333584127464936, 0.79003357957043518, -0.80712320792229963]], [[-0.52690277516838968, 0.27152115099374807, -0.042660564203006235], [-0.65377755743096477, 0.42624170909099068, -0.52657047118615763]]], [[[-0.50222575024804939, 0.042075720496248969, 0.27806058856005755], [0.18711611762404012, 0.96791549513515984, 0.65923104178471426]], [[0.61137509255388722, -0.49910215498951627, 0.84256716228537809], [-0.21062479049334115, -0.11170168998923402, -0.74307333606941794]], [[0.27802188232663672, 0.37575371077775288, 0.075157716986453904], [-0.095853532677121711, 0.61099700677134461, -0.7205033160671086]], [[0.47449904458407222, -0.18948260020782137, 0.27513466219947902], [-0.17404014930109146, -0.41888374414875318, -0.31349339720258573]], [[-0.86312189092496028, 0.60799460321673204, 0.86300352270305236], [0.94842808038735704, 0.94129610661648067, -0.56205777211800911]]], [[[0.14213428933631933, 0.0019196527250626705, -0.42298806861632499], [-0.095953597250465261, 0.9085521626495896, 0.64598585988799728]], [[0.0068930850622392903, -0.42542462549220872, -0.9412840717443316], [0.35322821070966914, 0.13450236230595647, 0.22809933667268378]], [[0.10566764781294324, -0.062860941890052979, -0.84919625519576636], [0.28711193013315284, -0.26857625720694833, 0.32490532782085801]], [[0.20573544437438551, 0.97309688395112781, -0.77419050181630111], [-0.75883750244236925, 0.014466685626755016, 0.38699458605419346]], [[0.8722091887240857, -0.015214858384371199, -0.025085842904177369], [-0.41507335933602052, 0.38532371305445445, 0.66334050873077954]]], [[[0.78897124089540926, -0.70157471690040429, -0.10781004682566753], [-0.88711882651660412, 0.70726944947710346, -0.044578955750778082]], [[0.53739910514900235, -0.7619781876749554, 0.50009288073435409], [-0.61128710335931968, 0.83902160397230907, 0.87811617031000622]], [[-0.076248249905632282, -0.025125909322088802, 0.08669545063995221], [-0.14503430927504901, -0.43351283534931762, -0.049776060308928116]], [[-0.46591902226887538, -0.13041170028878835, 0.27735253823869743], [-0.38461818776494083, 0.40791585696954158, 0.56279806658839515]], [[-0.1242416721329489, 0.93170641636949303, 0.045260175460943186], [-0.60934457416997745, 0.52248430642673616, 0.012817472555721743]]]])
62323          arg1=Symbol(shape=(2, 3, 2))
62324          res=generalTensorProduct(arg0,arg1,offset=2)
62325          s1=numarray.array([[[0.12950505242693189, 0.47051457465098201], [0.83867765114617354, 0.961118261121229], [-0.730766598941746, 0.95628696495978671]], [[0.99375473328959862, 0.33280680650502803], [-0.96591415860073182, 0.40935230386224686], [0.25029670963624251, -0.98236087052338728]]])
62326          sub=res.substitute({arg1:s1})
62327          ref=numarray.array([[[1.8405973637432791, -2.0676058052555053], [-1.017392028627587, -0.79967480680583536], [0.64306083487207633, 0.33660744655486563], [-0.87415821767920598, 0.91892999012359267], [-1.0025492353007661, 0.4464363909264697]], [[-0.81692258914936444, -0.11906990028297448], [-1.2425335488154317, 1.2278441519430714], [-0.5695464420124543, 1.489836034948389], [-0.14533786845839092, 0.3828220945492532], [-0.33990886289367983, 2.2566309187052673]], [[-0.48212697324653642, -0.63038402935117321], [0.610154507088429, -1.3572380257194632], [1.207591869970899, -1.1563377260821484], [0.73730248363661155, -0.33507822837413448], [-0.50011176776143174, -0.26027125649322902]], [[-1.9833333664878361, -0.36809532987354993], [-2.1330120618905544, -0.72387678389486787], [0.16784765833107457, -0.15394898305195154], [-1.0077535590709634, -0.59322719376391897], [-0.37476907271717003, 0.87879899836329822]]])
62328          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
62329          self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
62330          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62331       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62332       def test_generalTensorProduct_array_rank2_Symbol_rank2_offset0(self):
62333          arg0=numarray.array([[-0.8222396225859363, 0.03278054654308149, 0.369427853008653, 0.19935927395814401, -0.5323683722150947], [0.38183133575608763, 0.22575515798498658, -0.649788925390824, -0.72330663107720983, 0.46757312374795279], [-0.23045035372072986, 0.57270507816615202, 0.020339472824609572, -0.48167614290628769, 0.89322989973805944], [0.56908857340264474, -0.59322994038485999, -0.63461496882709412, 0.73200853857804282, 0.72340222693139955]])
62334          arg1=Symbol(shape=(4, 5))
62335          res=generalTensorProduct(arg0,arg1,offset=0)
62336          s1=numarray.array([[-0.16778914736083039, 0.22208730936206411, -0.71252400319296072, -0.0021339330304084303, 0.12592615704476784], [-0.45727377988681561, -0.88729022753596265, 0.035531649110194463, 0.78949964679125406, 0.23574180728520244], [0.42007427165250943, -0.46872818414330042, -0.78358662041793736, -0.22354771645585036, 0.29654545893319284], [-0.43163137522742523, -0.19412385253608311, 0.99729818952462046, 0.4895320574936004, -0.71500846320464007]])
62337          sub=res.substitute({arg1:s1})
62338          ref=numarray.array([[[[0.13796288519998523, -0.18260898543098966, 0.58586546746880053, 0.001754604289546691, -0.10354147584218726], [0.37598862019257978, 0.7295651818133595, -0.029215529754222216, -0.64915789160937076, -0.19383625464991139], [-0.34540171058162145, 0.38540688522537858, 0.64429596703583414, 0.18380979000860631, -0.24383142623280177], [0.35490441906324677, 0.15961632324419692, -0.82001808696036149, -0.40251265419725485, 0.58790828893113356]], [[-0.0055002199544856595, 0.0072801433811708798, -0.023356926249729595, -6.995149102312248e-05, 0.0041279282519974016], [-0.01498968442451056, -0.02908585860096399, 0.0011647468774091695, 0.025880229917387101, 0.0077277452858627261], [0.013770264213456142, -0.015365166056363531, -0.025686397681146125, -0.007328016323880587, 0.0097209222186989894], [-0.014149112385096883, -0.0063634859831813604, 0.032691979719042724, 0.016047128394999412, -0.023438368206776874]], [[-0.061985984467664068, 0.082045237878095867, -0.2632262127167061, -0.000788334297888035, 0.046520629834679049], [-0.16892967074073767, -0.32778972375416987, 0.013126380844635957, 0.29166315946518284, 0.087089589729751976], [0.15518713628076022, -0.17316124671270403, -0.28947872282730491, -0.082584752935271927, 0.1095521522131551], [-0.15945665224143998, -0.071714758060173536, 0.36842972896549725, 0.18084677697876927, -0.26414404144470666]], [[-0.033450322595911186, 0.044275164749738818, -0.14204826795429892, -0.00042541933961752672, 0.025104547240784137], [-0.091161768758331721, -0.1768895355517259, 0.0070835637691439015, 0.15739407637451555, 0.046997315541958663], [0.083745701805140432, -0.093445310474527601, -0.15621525972983577, -0.044566310447639368, 0.059119087388505936], [-0.086049717582894716, -0.038700390299551343, 0.19882064298339983, 0.097592755561160593, -0.14254356809840538]], [[0.08932563525584393, -0.11823225937471223, 0.37932524374401944, 0.0011360384538145602, -0.06703910324522544], [0.24343809785498755, 0.47236525411568142, -0.018915926198912143, -0.42030464182665211, -0.12550148220746779], [-0.22363425620908794, 0.24953606040370602, 0.41715673360142458, 0.11900973392200259, -0.15787142326004208], [0.22978689262678711, 0.10334539938275765, -0.53093001377028315, -0.26061138459497418, 0.38064789167627067]]], [[[-0.064067154262160891, 0.084799893988192404, -0.27206399189744301, -0.00081480249941488694, 0.048082552751034568], [-0.174601458180418, -0.33879521278337954, 0.013567097041362155, 0.30145570471326394, 0.090013609169263042], [0.16039752026184328, -0.17897510865796182, -0.29919792595477945, -0.085357523179560482, 0.11323034869686305], [-0.16481038455732486, -0.074122569915970396, 0.38079969985331369, 0.18691867940820733, -0.27301263658233516]], [[-0.037879265470610456, 0.050137355611493371, -0.16085596890892193, -0.00048174638840923632, 0.028428479478083794], [-0.10323191442074003, -0.20031034549591595, 0.0080214530583390588, 0.17823361749045066, 0.053219928947337139], [0.094833933562340433, -0.10581780526328667, -0.17689872128737316, -0.050467050045673485, 0.066946666931193305], [-0.097443009305744399, -0.04382446099793768, 0.22514521033427179, 0.11051438697818329, -0.16141684857136598]], [[0.1090275297558366, -0.14430987409331514, 0.462990206349922, 0.0013866060506850784, -0.081825422264715841], [0.29713143804205411, 0.57655136346037283, -0.023088072092677089, -0.51300812708492405, -0.15318241562554241], [-0.27295960956141718, 0.30457438307486745, 0.50916590803199901, 0.14525883044941962, -0.19269195508972811], [0.28046928747399219, 0.12613952953214821, -0.64803331886541748, -0.31809250958312568, 0.46460458095108759]], [[0.12136300290887975, -0.16063722353967669, 0.51537333631114757, 0.0015434879111691029, -0.091083224416550673], [0.33074915720987419, 0.64178290526676807, -0.025700277414512297, -0.57105032975722902, -0.17051361243151261], [-0.30384250623118925, 0.33903420376362869, 0.56677339857167464, 0.16169354567468447, -0.2144932968622128], [0.31220183588297201, 0.14041106978960335, -0.72135239364445392, -0.35408178330999107, 0.51717036271224137]], [[-0.078453695762509032, 0.10384205698319827, -0.33315707391832894, -0.00099776973289700493, 0.058879686610997371], [-0.21380892966971216, -0.41487306336002183, 0.016613644166369793, 0.36914881604809208, 0.11022653323033001], [0.19641543940270992, -0.21916470124858861, -0.36638404383591633, -0.10452490408998359, 0.13865668656666322], [-0.20181923042271194, -0.090767096124283325, 0.46630982978420465, 0.22889203329704516, -0.33431874064681671]]], [[[0.038667068359803033, -0.051180098999372835, 0.16420140857032825, 0.00049176562167397176, -0.029019727433658927], [0.10537890432213183, 0.20447634678860949, -0.0081882811057251703, -0.1819404728654358, -0.054326782875639038], [-0.096806264491298769, 0.10801857583469898, 0.18057781384614494, 0.051516650330712142, -0.068339005905430461], [0.09946960309812522, 0.044735910482571153, -0.22982772054099226, -0.11281283580703688, 0.16477395325882477]], [[-0.096093696754716365, 0.12719052986791132, -0.40806611494388412, -0.0012221142829813938, 0.072118549613486904], [-0.26188301585341051, -0.50815561911704632, 0.020349155881026204, 0.45215045692773459, 0.13501053016830181], [0.24057866858233978, -0.26844301133846737, -0.44876403669640569, -0.12802691242671257, 0.16983309023815163], [-0.24719748048858625, -0.11117571614059205, 0.57115773758665966, 0.28035749525170967, -0.40948897780907362]], [[-0.0034127428030100207, 0.0045171387934603621, -0.014492362599825248, -4.3403072881529023e-05, 0.0025612716491195727], [-0.0093007076194143862, -0.018047015470509357, 0.00072269501149036322, 0.016058006610949568, 0.0047948640829017222], [0.0085440892325938742, -0.0095336841635112503, -0.015937738771718293, -0.0045468427038572942, 0.0060315783032330499], [-0.0087791546266870728, -0.0039483768232661783, 0.020284519423868344, 0.0099568239801662954, -0.01454289520671663]], [[0.080820029322299508, -0.10697415856195451, 0.34320581358613272, 0.0010278646313074586, -0.060655625616335217], [0.22025787054806015, 0.42738653443796487, -0.017114747694498098, -0.38028314469228774, -0.11355120445489371], [-0.20233975490374884, 0.22577518380961309, 0.3774349809558854, 0.10767760181796246, -0.14283887285531527], [0.20790653597688274, 0.093504828535689491, -0.48037474525764307, -0.23579591328249649, 0.34440251870176336]], [[-0.14987428327424901, 0.19837502507457191, -0.63644774393300907, -0.0019060927867994555, 0.1124810086314971], [-0.40845061256114379, -0.7925541609805079, 0.031737931372226906, 0.70520469034658517, 0.21057163088543032], [0.37522289955070937, -0.4186820289267229, -0.69992299839199901, -0.19967950435653137, 0.26488327055067268], [-0.38554605001819375, -0.17339722933757135, 0.89081656183802493, 0.43726467063357466, -0.63866693790014462]]], [[[-0.095486886504021096, 0.12638735005568888, -0.4054892684922235, -0.0012143969040119161, 0.071663137066684326], [-0.26022928305022286, -0.50494672978254906, 0.020220655502763918, 0.44929522769432667, 0.13415796879929706], [0.23905946797788163, -0.26674785362772302, -0.44593019195104366, -0.12721845104527882, 0.16876063217332329], [-0.24563648356399709, -0.11047366630318492, 0.56755100393360669, 0.27858710023389449, -0.40690314629594604]], [[0.099537545886091899, -0.13174884129309125, 0.42269057193694187, 0.0012659129644144768, -0.074703166636562138], [0.27126849718181523, 0.52636712878522796, -0.021078438083416424, -0.46835482839984366, -0.1398490982820198], [-0.24920063512963164, 0.27806359273603376, 0.46484704411690692, 0.13261519850627571, -0.17591964492433892], [0.25605665499440061, 0.11516008146725994, -0.59162714551761941, -0.29040507328340642, 0.42416442800155896]], [[0.10648150452191808, -0.14093993090769952, 0.4521783980748571, 0.0013542258435717525, -0.079914624227481107], [0.29019278556831901, 0.56308766008832023, -0.022548916392441307, -0.50102829373743352, -0.14960527968154158], [-0.26658542080982156, 0.29746192196848104, 0.49727579868985733, 0.14186672710999756, -0.1881921871767045], [0.27391973173474821, 0.1231939026257818, -0.63290035945648437, -0.31066437140616449, 0.4537550735877211]], [[-0.12282308854885733, 0.16256980676285424, -0.52157365427905589, -0.0015620571990126893, 0.092179022187089621], [-0.33472831134500552, -0.64950402275317909, 0.026009470538421266, 0.57792048265554685, 0.17256501583258765], [0.30749795368658916, -0.34311303306507707, -0.57359209686144186, -0.16363883722530573, 0.2170738080156415], [-0.31595785218465838, -0.14210031759807767, 0.73003079024044537, 0.35834164599299284, -0.52339230022136085]], [[-0.12137904285574547, 0.16065845416571983, -0.51544145065186342, -0.0015436919063199284, 0.091095262435098204], [-0.33079287068746105, -0.64186772653398361, 0.025703674092859757, 0.57112580265034651, 0.17053614837094827], [0.30388266359001104, -0.33907901223477466, -0.56684830620398519, -0.16171491590959122, 0.21452164537866558], [-0.31224309805298195, -0.14042962722510513, 0.72144773121676342, 0.35412858054518043, -0.5172387145570343]]]])
62339          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
62340          self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
62341          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62342       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62343       def test_generalTensorProduct_array_rank3_Symbol_rank3_offset1(self):
62344          arg0=numarray.array([[[-0.72280763104259593, 0.52708645568279699, 0.79684456936427739], [0.39481141371782291, -0.78524294097019998, -0.89685527688615196], [0.30660301489467279, -0.48745923317429751, 0.016042886385379651], [-0.077128710729325922, 0.83649236323079235, 0.64055710244396624], [-0.81636136083218713, 0.70681051650094373, 0.32884121986105197]], [[-0.097471183002723949, -0.40874753561928467, 0.51300037617392902], [0.76389233171022131, -0.16948372189274208, -0.10549012689080173], [-0.12409851585675513, -0.3065391439491254, 0.7497351129937242], [0.43115360933205094, 0.60339901977273591, -0.6049637552647229], [0.20712477290995945, -0.43730932364594644, -0.99931824893621135]], [[0.91275430638930333, -0.77208486620124006, 0.35270730454597166], [0.5804730958521076, -0.33012709371601345, 0.70565155355266751], [-0.27018445718544704, 0.75286083998689768, 0.18409904509550135], [0.22633164574583287, -0.51510614107271357, 0.20574651863821458], [-0.30233418538080103, 0.2525897635172305, -0.067648970987682633]], [[-0.29645626887767751, -0.68704757433198571, 0.27589994654758399], [0.47648013449382609, -0.75457936817523596, -0.6568936186130041], [0.71498721884553573, 0.3531074517682633, 0.61044890580133071], [-0.71147690717443424, -0.54803114461063407, 0.99879037035317753], [-0.36974544714650914, -0.029579904317215355, 0.38589298888010948]]])
62345          arg1=Symbol(shape=(3, 4, 5))
62346          res=generalTensorProduct(arg0,arg1,offset=1)
62347          s1=numarray.array([[[-0.20810146419324149, -0.40007962822251009, 0.67637880469642897, 0.89363049838620578, 0.83950445709096932], [0.0071523601517180513, -0.59927091629557849, 0.14416487722656735, 0.15277916099330957, 0.25741319969215981], [-0.24954338652462593, 0.66355593978066829, -0.71070560872171407, -0.87323300624571432, -0.62486250015055322], [0.13794750795156685, 0.19956982249333755, -0.59379884549586182, 0.16781379475962255, -0.36658733030192958]], [[0.47778068034026844, 0.37701818200336179, 0.78032837757022788, 0.15435992198857718, -0.1838327782203022], [-0.61045577645885252, -0.85959719848951055, -0.98835291526775326, 0.053885311829183102, -0.72843144799524029], [0.045918628880079027, 0.57282474909443959, -0.83360965191498959, 0.90372931472480311, 0.23455553254771577], [0.35445501794463619, 0.85098082288375765, -0.27759051487298314, -0.0993565019291347, -0.63251082032639472]], [[0.38285053476048736, 0.70370212819986389, -0.51112256878194828, -0.031442928855984542, -0.4254290801013858], [0.030755822530351917, 0.64123697528451729, -0.78986124546712322, -0.99072108260261338, -0.82524391650968254], [-0.9713090645073359, -0.81380002845668398, 0.58412967050701115, -0.41159853468613061, 0.97096745901921278], [-0.42350539248628061, -0.36583776375583699, 0.37824549097310367, 0.69036023014904346, 0.46966441490759614]]])
62348          sub=res.substitute({arg1:s1})
62349          ref=numarray.array([[[[0.70732142124638386, 1.0486430048901847, -0.48487648592126448, -0.58961704648931412, -1.0426968475185143], [-0.30242514190277076, 0.49104175212467804, -1.2545475524617034, -0.87147843983143314, -1.2275977084719312], [-0.56940740182454086, -0.8261672633937357, 0.53977963630604286, 0.77954290486467126, 1.3489965745214327], [-0.25034904442246075, 0.012774039846619012, 0.58429100158157132, 0.37644324240199822, 0.30583377176167831]], [[-0.80069626220264611, -1.0851258366858514, 0.11269769491291354, 0.25980523796422522, 0.85734764837268085], [0.45459640093039499, -0.13670313048941884, 1.5414063148926564, 0.90653932665706249, 1.4137496830389575], [0.73654380358592286, 0.54203371787770727, -0.14988836880571682, -0.6852651048445586, -1.3017032125684125], [0.15595299594177925, -0.26133071140782133, -0.35569403390756038, -0.47487942203176381, -0.069279214254500121]], [[-0.29056111275806074, -0.29515720081122759, -0.181198373123719, 0.19824120046638338, 0.3401804722680728], [0.30025865203212526, 0.24556761348014777, 0.51331148596034293, 0.004681632822221754, 0.42076500376631309], [-0.11447681524475603, -0.088836162645763356, 0.19781736529081595, -0.71487029970171889, -0.29034386584433508], [-0.13728149830216999, -0.35949884378991342, -0.040678307316100781, 0.11095983039273838, 0.20346123160560775]], [[0.66094811725325742, 0.79699185218219659, 0.27316731182621012, 0.040055336323071414, -0.49103623036487759], [-0.49149238685180452, -0.2620765999714158, -1.3438201476405054, -0.60132243388037987, -1.1577971435710861], [-0.56452137787648937, -0.093301074242006454, -0.26832389124204153, 0.55966164138439023, 0.86635885286613867], [0.014579815102487292, 0.46210641857270812, 0.055884429299330629, 0.34616093193336889, -0.19996918597372909]], [[0.63348344082053742, 0.82449623194506838, -0.16870338686603892, -0.63076192463692327, -0.95517255960407033], [-0.42720169092777366, 0.092514430059646852, -1.0760078053628785, -0.4124262280346041, -0.99637941417786147], [-0.083233109229029656, -0.40443386729631758, 0.18307444266348061, 1.2162885047808063, 0.99519404173337722], [-0.0013485108878725782, 0.31825856657845902, 0.41293324703498524, 0.019795981923130507, 0.0066474513453282091]]], [[[0.021394688594444211, 0.24589043836152552, -0.64709081361347898, -0.1663276938873634, -0.22493157563246075], [0.26460289375447255, 0.73872469119587469, -0.015264218742728486, -0.54515734203501964, -0.15069624946358329], [-0.4927277527720979, -0.71629800770162633, 0.70966794804192812, -0.49543227923149635, 0.46313876293846662], [-0.37558694752222566, -0.55496353132844956, 0.3653827939570482, 0.37840977397386932, 0.53520696134239043]], [[-0.2803301121594966, -0.44374983157694753, 0.43834600914736066, 0.65979290956474479, 0.71732624830993608], [0.10568151449733947, -0.37973489493641149, 0.36095873784889454, 0.21208543904089172, 0.40714832774425413], [-0.095943223056904101, 0.49564869185605376, -0.46323921125616352, -0.77680382345839383, -0.61950849734378166], [0.089978325410237592, 0.046814732041793393, -0.4464524758685019, 0.072204792434476056, -0.2223779212781137]], [[0.166403091045424, 0.46166865192221895, -0.706345335538757, -0.18178944473918798, -0.36678843415530799], [0.20929971393480246, 0.81862669679513145, -0.30710850085634617, -0.7782560073029946, -0.42736618454142311], [-0.71133240450887836, -0.86807397182426527, 0.78167402485974669, -0.47725136433620263, 0.73361245432851585], [-0.44329028206130117, -0.55990666889198248, 0.44236584015513886, 0.52721851933434383, 0.59150617220364965]], [[-0.033042000424343521, -0.37071765633459997, 1.0716831696581677, 0.49745447272575349, 0.50840003244183718], [-0.38387080912943705, -1.1649830540792385, -0.056376547911079766, 0.69773597758207384, 0.17069246718608905], [0.50772250305753508, 1.1240559517849982, -1.1627998142429623, 0.4178140154192943, -0.71528126410270543], [0.52955978894636146, 0.82084483103459438, -0.65234117265635039, -0.40524100988215223, -0.82384180773238169]], [[-0.63463044068510044, -0.95096234684097614, 0.30962404173383734, 0.14901147356657937, 0.67941300131280147], [0.23770457897555253, -0.38901379426434324, 1.2513988190791663, 0.99812545720627366, 1.1965478199672175], [0.89887961171594843, 0.70018248916754966, -0.36639090423139509, -0.16475951655018856, -1.2023033256606115], [0.29678252933211535, 0.034782359543868824, -0.37958515242515173, -0.61168165753853954, -0.26867065919788624]]], [[[-0.42379856010299888, -0.40806355532559019, -0.16538872777991906, 0.68539597532361918, 0.75814387030038866], [0.48869981728210987, 0.34286384356789557, 0.61608961000871021, -0.25158875925229363, 0.50629634621755815], [-0.6058126811397947, -0.1236389926727251, 0.20094459321692573, -1.6399767236977079, -0.40897539960495011], [-0.29713061861019707, -0.60390485142533168, -0.19425907024311281, 0.47337951127816114, 0.31940193750491597]], [[-0.0083665739737924238, 0.13986912291800691, -0.22566227541731915, 0.44558231791831165, 0.24779324069282149], [0.22738263791376337, 0.38840554867247862, -0.14740090687498314, -0.62820867990059015, -0.1924382579084245], [-0.84541795597436309, -0.37818785335327676, 0.27484365621564333, -1.0956789441530259, 0.2450156896867246], [-0.33578762606726698, -0.42324089950785343, 0.013865414089221595, 0.61736543511011255, 0.32743430036571386]], [[0.48641056333674149, 0.52148841220890541, 0.3106344607649722, -0.13102214377959787, -0.4435426432744714], [-0.45585858762588777, -0.36719226684904338, -0.92845601613908735, -0.18310121881867308, -0.76988317444206822], [-0.076823989326328099, 0.10215501222913737, -0.32803273909848485, 0.84054149959498892, 0.52416999270040843], [0.15161709164187065, 0.51939909000072559, 0.021082824247802515, 0.0069523605964626201, -0.29068165834321641]], [[-0.2144375447163962, -0.1399707984955588, -0.35402770044949672, 0.11627584448868983, 0.19716926621777861], [0.32239622816484653, 0.43908209834494394, 0.37922452866086909, -0.19701530978051776, 0.26368920248663197], [-0.27997599162700004, -0.31231836084464343, 0.38872492703622374, -0.74784174889361665, -0.062473978857643248], [-0.2384948301046694, -0.46844632771556699, 0.086415801929874428, 0.23119993060544125, 0.33947171236375057]], [[0.15769925099503451, 0.16858395706546853, 0.027187441256193094, -0.22905823078745363, -0.27146533463843625], [-0.15843788293954675, -0.079324390323161076, -0.23980049937696427, 0.034441776763780803, -0.20599223545710102], [0.15275213081687372, -0.00087324208275730425, -0.035206434717615746, 0.52012518081240744, 0.18247867199073908], [0.076475165727714359, 0.1793608133663096, 0.083821249481597179, -0.12253444144089336, -0.080706191028607918]]], [[[-0.16093663179162487, 0.053728065968112387, -0.87765814518648899, -0.37965007567386605, -0.23995035515616076], [0.42577732824090686, 0.94515903722201566, 0.41838421600847248, -0.35565400654832702, 0.1964705502179234], [-0.22555370027527605, -0.81480055683328223, 0.94458396718974469, -0.47558964836090883, 0.2919834657159992], [-0.40126797894653643, -0.74476265458760116, 0.47111119084196973, 0.20898354278058007, 0.67282252397143083]], [[-0.71117173071139228, -0.93737757404925515, 0.06921452347632634, 0.32997502696912379, 0.81818526615324638], [0.44384198807090064, -0.058130852956441881, 1.3333372301641675, 0.68293384761097908, 1.2144090803514402], [0.48449500983473393, 0.41850953170432653, -0.093323512581020007, -0.82763722470110457, -1.1125476613743497], [0.076462793427078651, -0.3067250233394726, -0.32193632772922731, -0.29856092378233912, -0.0059115223225151281]], [[0.25362872144784365, 0.27665030298761667, 0.44712775255894827, 0.67424572190991283, 0.27561951667109469], [-0.19166777933887025, -0.34055881216117206, -0.72808866776478076, -0.47652214826517325, -0.5769366704999781], [-0.75514067750341884, 0.17991936648227363, -0.44591788834789609, -0.55649675825757505, 0.22878062817953648], [-0.0347369902343454, 0.2198522796365957, -0.29167831834779723, 0.50633084428953123, -0.19874341156372927]], [[0.26860812040629317, 0.78088061993198754, -1.4193764537453166, -0.75179640243503143, -0.92145641529868505], [0.36017865820278305, 1.5379147707064427, -0.34982760742662633, -1.1277523510730383, -0.60818610397005235], [-0.81775462216040584, -1.5988461624955779, 1.5459177700422699, -0.28508734513646911, 1.2858244500342018], [-0.71539196331492327, -0.97374855003046634, 0.95239036768948737, 0.62457996774761881, 1.0765503437219013]], [[0.21055119927396687, 0.40832917681417064, -0.47040863807878308, -0.3471153657277809, -0.4691352941553027], [0.02728112713679811, 0.49445334876325631, -0.32887083914157178, -0.44039564127621061, -0.39208626758529036], [-0.28391209564472741, -0.57633061426153964, 0.51284980127339874, 0.13730871293048544, 0.5987914691796663], [-0.22491797023923257, -0.24013619267239061, 0.37372780355429319, 0.20729574185578251, 0.33549381074491025]]]])
62350          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
62351          self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
62352          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62353       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62354       def test_generalTensorProduct_array_rank4_Symbol_rank4_offset2(self):
62355          arg0=numarray.array([[[[-0.89079727381427576, 0.34407525310978615, 0.60994631872327676], [-0.76369952256235041, -0.44030648659441995, -0.58241503475623713]], [[-0.7443488531626643, -0.93019092492828559, -0.22782111679329309], [0.55917653124015532, 0.32427495611984858, -0.6658525980204828]], [[0.0072147671160203153, -0.76170783499280414, 0.81301270091236], [-0.4752970349689114, 0.37508962609630214, 0.55078845060385495]], [[0.99810961529189046, 0.840455510969361, 0.82074376856089359], [0.89306047862779048, -0.62596938272704006, -0.24240749565805597]], [[0.31683252669707329, -0.3088851944688209, 0.64057111037927239], [-0.82545818717123431, 0.80695287283961536, 0.97626399614989712]]], [[[0.68782596289819575, 0.91160552414101903, 0.67788478924296314], [-0.14185322414490753, -0.47354822574717637, -0.56248718088747474]], [[-0.77961326624298888, 0.88305204734237708, 0.51585268988950128], [-0.67751369768179637, -0.4889647321078241, -0.24822832278075047]], [[-0.83422211384452138, 0.5961173725742861, -0.00089922593614688573], [0.17044339547893705, 0.44028661176052952, -0.48895873761135666]], [[0.30424179177245314, -0.18890255676725975, -0.057064134928165311], [0.31765416942986557, 0.26067906261794538, 0.58208903840820736]], [[0.96682288056451049, 0.62493695115395753, 0.73497517024286996], [-0.97217930671289343, -0.37355645055338704, -0.27473063991102786]]], [[[0.59306195862340694, 0.4615501471272323, 0.2087953640078728], [0.05967557251749156, -0.21497142345338482, 0.91947020624950593]], [[0.29013441447758281, 0.8116105544808736, -0.25109784740529895], [-0.6039762088049343, 0.9267434197057185, 0.93003379512535744]], [[-0.49260759251924546, -0.43863502038186364, 0.27529223985084905], [-0.034053979935777301, 0.119054691208345, 0.19116020822979229]], [[-0.4252352007385487, 0.9089991261414192, -0.063037219494322949], [-0.15169444532703946, 0.15337147128113116, -0.6870390569292808]], [[0.16186724685064102, 0.51351230287515537, 0.67363567063789143], [0.72219894850001931, 0.00067760832461249976, -0.20214504366954289]]], [[[-0.3638242054286942, 0.99138099095836196, 0.21915506145400077], [0.21314805039165585, -0.023654481501133029, -0.4499823220778123]], [[0.10266706147466165, 0.815102454741649, 0.30884359008026752], [0.92645840219697573, -0.57281705577909281, -0.46007034516660839]], [[0.57071762598671061, 0.17593193962673292, 0.42995087171415647], [-0.80497988014150423, 0.3896278105958535, 0.73929775983694812]], [[0.38251336134238456, -0.66557029007090995, -0.099903731385126759], [0.77973037392404354, -0.093620758516042901, -0.0097249085530126678]], [[-0.27116038701459044, 0.32162106446876937, 0.070228321220291656], [0.47196121941555669, 0.19322428276428183, -0.55978609989958761]]]])
62356          arg1=Symbol(shape=(2, 3, 4, 5))
62357          res=generalTensorProduct(arg0,arg1,offset=2)
62358          s1=numarray.array([[[[-0.81594382792481124, 0.27613311838528887, -0.26591659097680931, -0.89390345174630137, 0.96193291417744375], [0.03651904384147775, 0.24211399572666115, 0.3224840672767868, 0.58674196871905737, 0.9976598522531952], [0.38434220402286656, -0.30373686858224547, 0.81463498104907095, 0.68365822113764185, -0.65968813587805197], [-0.12233733221493326, 0.92856114833030978, 0.28856810285598589, -0.35819806143888622, 0.069825935543508466]], [[-0.029283631758113549, -0.65891883889460812, 0.97718843457683202, 0.4832588853483335, 0.046664930154126649], [0.0026823941906974902, 0.54400892516649146, 0.57438846005630251, -0.88033939998421196, -0.70159626130890973], [0.095045512693729073, 0.91305760285115012, 0.21430310358618776, -0.77452109408318726, -0.63947847769926658], [0.83117606643318043, -0.70065406024284838, 0.97243565279278577, 0.6236509593793631, 0.83426892885014103]], [[-0.79346834790797915, 0.72419488509901586, -0.72902334484479536, 0.18493915747794221, 0.69451368789727552], [-0.56717260302156891, -0.5094640595820823, 0.84972170499627553, -0.32303588620714074, -0.49218182862482629], [0.99560118974324596, -0.75994604450251613, 0.91232048971865165, -0.31499256942726306, 0.63139588852803841], [-0.79224818811342068, -0.87696202224823416, 0.21177408749187898, 0.89535106968767275, 0.32895524035231172]]], [[[-0.12931720101450983, -0.017445077939739262, -0.34951966070625984, 0.36172991024190648, 0.4421417323954846], [-0.43523863476698832, -0.53918000782067366, 0.067537239341220801, -0.20805052144335501, -0.42382369358865457], [0.32679630904570134, -0.40800587931163323, -0.66580144833630261, -0.5316632555496803, 0.32277060129690027], [-0.73822671172908438, -0.99720400932239728, 0.27036734718760203, -0.041681655203751999, 0.97564278310001806]], [[0.62868612695833104, 0.76271668408731252, -0.64699582793739574, -0.12120808165263375, 0.18692812296516648], [-0.0062707371289414393, -0.17426787225221929, -0.89253775124380907, -0.61895075607145911, -0.38140284724954454], [0.15331621686963781, -0.58516904168969575, 0.81161197964661969, 0.96659316415029783, 0.56690834268674362], [-0.74995971033969044, 0.27518310570557647, -0.63141798555212136, -0.64647682230956893, 0.11525308823201708]], [[-0.032866579503731286, -0.50020125861258413, 0.38960157791052286, -0.2255815649635502, -0.087401800037694377], [0.41299473560028921, 0.38713949131347247, -0.83772393505533782, 0.83097577476203877, -0.80256836663145892], [-0.51753561927535818, 0.015387704388261536, -0.24931257207278201, 0.24265909609127556, -0.8273761781761213], [0.525639425127997, 0.53102590752961754, -0.35925119898289126, -0.81856858843706637, 0.10976165841585384]]]])
62359          sub=res.substitute({arg1:s1})
62360          ref=numarray.array([[[[0.07387856164813647, -0.062157863458374651, 0.45333366812373987, 0.98386497928367955, -0.78627987524857978], [-0.2829347200128382, -0.076213277572230231, 1.2579645714146186, -1.075162365710701, -0.4712830990443056], [0.28193531758880164, 0.68148779767917989, 0.20084591784462924, -1.2285175507728978, 0.73850042267170113], [0.49959121998674272, -1.272015372770293, 0.48747750946964119, 1.8730076585963813, -0.4342758723849775]], [[0.9687953859220485, 0.8130294153895159, -1.209615149699498, 0.48689013640020173, -0.55159773529788614], [-0.42086644202660217, -1.1859681185058926, -0.66177786867936161, -0.41461717112249352, 0.19586149984122259], [-0.024258254402571289, -0.87824887033547605, -0.95667097032629356, 0.13790739026997192, 1.8572603685125535], [-1.507590495026129, -0.66160397969397611, -0.98195438485752173, -0.20536765241002997, -0.39310203994769255]], [[-0.34950592346826737, 1.1115491513237796, -1.200923567117866, -0.56583426907822476, 0.34786977154074911], [-0.030909979448581287, -0.4226932670331281, -0.57264557373006686, 0.73657799451487294, -0.24220431870983355], [0.35694180395882197, -1.3326117893569505, 1.0679313970169588, 1.0877091259995442, 0.59918943245391132], [-0.91901281220956677, 0.69708115139499727, -1.1296694270916332, -0.42322605319050433, -0.72755504374478064]], [[-1.9913064150035491, -0.055566676863953987, -0.044056827885688252, 0.1193335212059382, 1.868386947015972], [-0.91168109145809795, -0.18554736389113602, 2.3241128950530672, -0.41917522224752013, 0.056953180251855612], [1.6019627707042325, -0.16130549229801722, 0.69977861502873162, -1.3658004178572933, -0.54373145157259051], [-0.39102054574655787, -1.573368219748239, 2.0029116668326079, 1.4673613875607121, 1.8134038778111541]], [[-0.17576560468732194, 0.89646467115858086, -0.70630864176124419, -0.93065180828530103, 0.43578837628618683], [0.40483048105402064, 0.26472026654132913, -1.1247642593921481, 0.73441993699659269, -0.52391765738254215], [0.078878200546919075, -0.98545276031605633, 1.7374429399403166, 1.7098283770491158, -0.22373415325259416], [-0.28563374242677442, 1.5124949901448907, -1.1567123610193817, -1.0189982225576326, -0.6300431263052465]]], [[[-1.386684701804604, 0.002826475487963942, 0.35053052730500556, 0.084030965339950831, 1.0729063868622966], [-0.52450839310062192, 0.25834356008343495, 2.2057302941454533, -0.76272456549447287, 0.4051625628589729], [1.1980548826013804, 0.43460171074726878, 1.2244789611703972, -0.96815146704272004, -0.45754506758707092], [0.3007013953561023, -0.88206199480930247, 1.6912493598400868, 1.7015755714050167, 0.77683051363360522]], [[-0.010683872537996505, -0.66051695294741564, 1.1506040495839764, 1.0892283413215955, -0.71972408230234164], [-0.12325023468776597, 0.38323820426630589, 1.2927421608292304, -1.1641258171404023, -0.97836909277729689], [0.12996720544010376, 1.2097913981297312, 0.14088994325941595, -1.5520769106564929, -0.015185377649474752], [1.1570481405809427, -1.3857669384820173, 0.95772387319643437, 1.8393776412069363, 0.10734610818586868]], [[0.93476663369303348, -0.046382213312508191, 0.27007204509096738, 1.152214997800789, -0.5748744963411474], [-0.30723781277324069, -0.23514827415541767, 0.1007667993478622, -1.7282576876276914, -1.0978027494343525], [0.11139315827746743, 0.46364892034471156, -0.1868931055795871, -0.81543578313208975, 0.87772351592435904], [-0.11479166608223496, -1.499966871967936, 0.28250191679362163, 0.7782876035253905, 0.60214339575383147]], [[-0.093757987900679435, 0.069278232307970311, -0.27679708293700156, -0.42180497103284087, 0.38251402886790814], [0.14347881376348098, 0.0086175359298559795, -0.75772129074592942, 0.61950982593215376, -0.23707026997538533], [-0.11531177332318493, -0.49471177308284414, 0.010256351207646452, 0.59661594559491715, -0.34723168253477199], [-0.27305309545923678, 0.52897835268593307, -0.3958161279907908, -0.93612364115002866, 0.24872901096127747]], [[-1.490453914580351, 0.25691696401892805, 0.29222261516630732, -0.67072839188553057, 0.99397440963066297], [-0.067863845537938103, 0.68252864976076333, 1.7931692632210299, -0.015123462868927101, 0.9393637597996346], [0.92993646457492229, 0.32942327610172445, 2.0046558769835334, 0.034566857107555568, -0.87163259412608196], [0.67230312259338709, 0.53611983121855256, 1.1140759456365112, 1.208392754314652, -0.19105942292456898]]], [[[-0.8361800920518575, -0.61407499506579089, 0.61755462825555385, -0.42825029830071826, 0.64287276702772533], [0.25958437429548648, 0.64955223102444015, 0.059418298460495955, 0.75890382425156999, -0.51615194585453472], [-0.0096315076505035235, 0.19820905089785754, 0.32908798792352506, -0.034197037891473991, -1.417910107197258], [0.74613366450258289, 0.41379898068677923, 0.48573440593707279, -0.35380506208004081, 0.62952087802359424]], [[0.56890611912622546, -0.38433853508276161, 0.87284615294407719, -0.45417549787954997, -0.032522606526337636], [0.79634978806283352, 1.1638974199355823, -1.3006757725881801, -0.13826051701822539, -1.0002805310376379], [-0.59796049081517932, 0.56217885518620725, 1.1036177713536022, 1.0914142111144776, -1.3080028562840487], [1.0777423859504172, 1.2721362602593076, -0.26278710511295816, -1.1578244740042802, 0.23438748568022483]], [[0.26931828827067272, 0.34814533655777768, -0.48898004096669317, 0.20941071841324438, -0.31263986287978823], [-0.082281159847953464, -0.42652057739126958, -0.44558340249645423, 0.10043032863119242, -0.50359801633991186], [-0.048746813543969127, -0.51291458016193991, -0.17250071234055731, 0.095811299351504231, 0.67762349951034206], [-0.48608373250938863, -0.2232740750998406, -0.66345029943462963, -0.082645279180308201, -0.30829856713784759]], [[0.5089871213209991, -0.29874630028617805, 0.7334141210074564, 0.8892641337095144, -0.38876212024836576], [-0.1960198876527498, 0.21274638300472026, 0.75983714771103006, -1.6636498923625935, -0.47377350399975982], [0.18970885568684423, 0.96860509177190468, 0.18764369646323634, -0.91271638103013997, 0.26586060670478928], [0.49332923346793434, -1.1478295591601235, 0.85684906858251564, 1.1323365249602557, 0.50218725649134888]], [[-0.76794359635794962, 0.28320869586060038, -0.36395820208759933, 0.53480633030367875, 0.98462644109538466], [-0.77259698964374601, -0.49241921102235292, 1.1370702732537876, -0.89335020963831491, -0.67444934454010208], [1.1224250291258726, -0.39039398233392619, 0.42658777663930159, -0.93161847347348958, 0.39090754909372027], [-0.76658004915046052, -1.6275812192392398, 0.95617798432409662, 1.0003414020140271, 1.3438043880455759]]], [[[0.066290700575736217, -0.39167087749439716, 0.67123486898221874, 1.0263245940118553, -0.022356338160435744], [-0.41338824971956895, 0.054572669331053231, 1.05080001383917, -1.5606466393273353, -0.88655986888249982], [0.47149561774299753, 0.76910077149930101, 0.067085460379194661, -1.3309886648091924, 0.17210996507350279], [0.31875610938393206, -1.6826524794912254, 1.1396983502628428, 1.3195666546063789, 1.0296054969306661]], [[-0.81750553355936784, -0.50800513769038869, 0.4116043161409404, 0.86758949602666757, 0.69405290769544281], [-0.75887702942433, -0.26688020482838465, 1.7229682669103201, -0.97760721040907494, -0.42639629286531938], [0.87745999449297263, 0.42846216308469531, -0.42696170871527461, -1.8162934951744218, -0.039016134677127001], [-0.075924875316246726, -2.0724231813664589, 1.6651181113413733, 1.4563834875713835, 1.5761546280454326]], [[-0.48722470283585978, 0.29445828905204535, 0.024011449003874252, -0.85081431573809885, 0.50810992790808951], [0.43069879905887198, 0.66718356093353948, -0.37101187232020816, 0.58174918903576356, -0.16643774075523227], [0.078190895312576725, -0.22763696712438791, 1.562749435679502, 1.1024685969385257, -0.86814906170542072], [0.42643908606361763, 1.3321626191488909, -0.30242604196247524, -0.53325123019318355, -0.33126041865266487]], [[-0.37271964940659785, 0.39168747861229514, -0.89501978177499875, -0.38645573164939817, 0.59560985255099741], [-0.2739516885886798, -0.6264318141073566, -0.19946411156564958, 0.7302790478751513, 0.61079457266629023], [0.22978469938963778, -0.91146622996271487, -0.51487403455191938, 0.3010685547014284, 0.31684535462003949], [-1.0313709980034778, 0.10065606593613918, -0.2845789975308991, -0.60556430466911415, 0.18746169282235373]], [[0.23495243777028302, 0.18320814510560285, -0.1728762332953894, 0.68438497896097483, 0.0966639700162438], [-0.48668751114514885, -0.43132594537666263, 0.48532625770788068, -1.1478799239883646, -0.35519709458277898], [0.46983850476900085, 0.0084045863313373659, -0.10574921645349442, -0.65659708245565007, 0.74258276322718708], [-0.54271194059523875, -1.2534521593627921, 0.4560815330195338, 0.67422358539693805, 0.69377860978367956]]]])
62361          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
62362          self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
62363          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62364       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62365       def test_generalTensorProduct_array_rank2_constData_rank0_offset0(self):
62366          arg0=numarray.array([[-0.662359882134963, 0.86380861201948433, 0.75964455309861512, 0.89079865840282424, -0.88496614814745023], [-0.36623039076783948, -0.62974899853869259, 0.64222146561478355, 0.4038142206450952, -0.33061099616945944], [-0.047887333733072079, -0.49960564157610055, 0.23433800869052046, -0.1886709067525485, 0.82439054185559013], [0.58708431838425534, -0.59261107098668275, -0.71601429670526651, 0.51529254449023987, -0.40179051097427032]])
62367          arg1=Data(-0.207390150749,self.functionspace)
62368          res=generalTensorProduct(arg0,arg1,offset=0)
62369          ref=Data(numarray.array([[0.1373669158059464, -0.17914539826485734, -0.1575427983826484, -0.1847428680530161, 0.18353326287190999], [0.07595257595014468, 0.13060373974086337, -0.13319040656798367, -0.083747092094107078, 0.068565464334804621], [0.0099313613618612889, 0.10361328932143278, -0.048599394948507374, 0.039128487793329239, -0.17097047875133942], [-0.12175550529198408, 0.12290169934735297, 0.14849431293202178, -0.10686659848157837, 0.083327394640402841]]),self.functionspace)
62370          self.failUnless(isinstance(res,Data),"wrong type of result.")
62371          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
62372          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62373       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62374       def test_generalTensorProduct_array_rank3_constData_rank1_offset1(self):
62375          arg0=numarray.array([[[0.42236545173850604, -0.30875721171145964, 0.61336969718118817], [-0.067817549680461164, 0.10418586162940824, 0.48951464610373319], [0.083251520746641328, -0.55893306294887268, -0.64686593816052351], [-0.67819329021271857, 0.47134699755919263, -0.70571439813516301], [-0.17413016609644139, -0.54992924556077472, -0.2328081552310417]], [[0.9462632771207844, 0.34871276878097301, -0.78052138545785277], [0.71201931729012191, -0.78322471064304411, -0.95653734331660845], [0.63789177192214219, 0.22090710989343854, -0.91738194159246778], [-0.30508120621141765, -0.4858982697381351, -0.38044635456921805], [0.82103652736880517, -0.033785164533534529, -0.53795598818441914]], [[-0.93129868769955548, 0.37230407942019417, 0.032213890485201402], [0.47232519145634, 0.94660787647901223, 0.31615145623939589], [0.52558340503316359, 0.27268939249061153, 0.68205665898823242], [0.13048180119683961, -0.82436122268654843, -0.45600082923713336], [-0.97597546446967143, 0.66639349555100824, -0.70324942039805727]], [[-0.79766543108220622, -0.52562076152442616, 0.4201950890993853], [-0.048102182461442045, 0.86207255174601127, 0.89840591270482606], [0.69806252804412794, 0.80887299282790281, 0.73525510954087081], [-0.053076507346795809, -0.29002613382834852, -0.21679220134944743], [-0.4324600801713705, -0.08929968941667088, 0.3498178936025278]]])
62376          arg1=Data(numarray.array([-0.90338993641931808, -0.51498500278947357, -0.014648285876649902]),self.functionspace)
62377          res=generalTensorProduct(arg0,arg1,offset=1)
62378          ref=Data(numarray.array([[-0.23154017972965368, 0.00044098517516665339, 0.22210903613377708, 0.38027386472359692, 0.44392299414991798], [-1.0229932675704498, -0.22587047352416387, -0.67659078294531461, 0.53141050024101455, -0.7164371501021165], [0.64912296661252833, -0.91881376149938077, -0.62522866733332816, 0.31333735098432985, 0.54880515518142692], [0.98513459462001196, -0.41365951455274858, -1.0579503503311227, 0.20048352607718858, 0.43154385262299361]]),self.functionspace)
62379          self.failUnless(isinstance(res,Data),"wrong type of result.")
62380          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
62381          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62382       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62383       def test_generalTensorProduct_array_rank4_constData_rank2_offset2(self):
62384          arg0=numarray.array([[[[-0.42493944375973092, 0.90231671087994014, 0.38244905746690061], [0.25448929118408081, -0.090247057657690588, -0.42983915587348265]], [[0.65315421363176007, -0.35808364529233683, -0.51641398457775756], [-0.1254143223033235, -0.63794526269707186, -0.35998028081056233]], [[-0.097233480127054461, 0.5754236689264085, 0.030155764746026437], [-0.91418760266403942, 0.63015376942955847, 0.57435421188300984]], [[0.91855169049900942, -0.59084043050374069, -0.96008325330227251], [0.85422726616130151, 0.62426513572923525, -0.35903923634018553]], [[-0.47263093279646973, -0.75294615852133639, -0.31147468902352471], [-0.3071292525255116, 0.85408839184651764, 0.23763977080152454]]], [[[0.96592643726942984, 0.88464545631515268, -0.72569364045227069], [-0.77560842583068101, -0.65114210697683528, 0.23786755537340265]], [[-0.3537774108114824, 0.99770339055370116, -0.11135409243665584], [0.66050176455609333, 0.20382062018209468, 0.36724179672283164]], [[0.70188583587816589, -0.92938038190258654, 0.70445178466967517], [-0.43322111111788697, -0.24329905911830085, -0.01369195723185368]], [[-0.91623021764565582, -0.54463428883805309, -0.24799094690643897], [0.97423886990082553, 0.21455911934382144, 0.4886386318922511]], [[-0.30597678306774201, -0.85013629741434715, -0.028894680439520481], [0.3315755399472089, -0.063468656466200146, -0.08910671496260858]]], [[[-0.030626788835622865, -0.85406771079137167, -0.55430419945874498], [0.77848647729555132, 0.75470662996834337, 0.35594631897583651]], [[-0.20707146431740342, -0.26220709089195737, -0.63310689887989069], [-0.40907262529271127, -0.90052993981374652, 0.088904568131023654]], [[0.77283278443071679, 0.98167991068752913, 0.88817143380574204], [-0.61198386568530916, -0.40220836177511021, 0.41879337621363888]], [[-0.40236371723890563, -0.77568526863770937, -0.76152603793219398], [-0.99330619317951929, 0.54266977745728973, -0.41633320069971225]], [[-0.12799529951010991, -0.74473474144239771, 0.86308743044738434], [-0.80894730045607899, 0.64050726234788313, -0.90742690986825147]]], [[[-0.39083329977404757, -0.13005949105907977, -0.98022686825736782], [0.27203629070345881, 0.26425125043955533, -0.57880878105290101]], [[0.92386239921153579, -0.54280866110523984, -0.16072362954607788], [0.082768697019453663, 0.70358296913248464, 0.53863480756890536]], [[-0.6220346867505171, -0.6424898163661934, 0.35213428202959318], [0.84879303721830279, 0.50590910840608094, 0.76850476391004818]], [[-0.36833091075617452, 0.70455868330233384, 0.057625549495180284], [0.095350654010359026, 0.51969065349824861, -0.075476724424021979]], [[0.87260845371986151, -0.76074579191681857, 0.6677921665349229], [0.79157673039160614, -0.33490922028689041, -0.31637672467764988]]]])
62385          arg1=Data(numarray.array([[0.3255909618146946, -0.10530052704319015, 0.7095428061147715], [-0.37758293649761643, -0.2869565075606233, 0.76154708589971487]]),self.functionspace)
62386          res=generalTensorProduct(arg0,arg1,offset=2)
62387          ref=Data(numarray.array([[-0.3595434799417066, -0.15977540366979862, 0.53089873896786721, -1.0950360954281002, -0.24374893962028232], [0.36728589849618221, -0.32746584457676708, 1.0491967019485502, -0.47422997522944171, -0.20544896871537743], [-0.55278188961926777, -0.0084497136030585729, 1.44387345622601, -0.68738573456385443, 0.079742976658337961], [-1.4284043976859764, 0.42096499892080552, 0.23456887603533783, -0.39583829650738606, 0.3943302274678373]]),self.functionspace)
62388          self.failUnless(isinstance(res,Data),"wrong type of result.")
62389          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
62390          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62391       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62392       def test_generalTensorProduct_array_rank2_constData_rank1_offset0(self):
62393          arg0=numarray.array([[0.21747059525578338, 0.22779169763087626, 0.05711796500700661, -0.47679534356801523, -0.35575634715995208], [-0.13432171930270353, -0.84526786163385959, -0.37917531963194051, -0.84449747575854284, -0.77508778699726655], [-0.46381579774356529, 0.97133190538061198, 0.58360308159616037, -0.34987714775851941, 0.88804617176818423], [0.44291763413570995, 0.96707431629007057, 0.59518256620437127, -0.52439710804938477, -0.77226135294034681]])
62394          arg1=Data(numarray.array([0.59515759980008665, -0.9234756572091054]),self.functionspace)
62395          res=generalTensorProduct(arg0,arg1,offset=0)
62396          ref=Data(numarray.array([[[0.12942927749952815, -0.20082880087748992], [0.13557196001637939, -0.21036008767645126], [0.033994190959035393, -0.052747050273292115], [-0.28376837227379764, 0.4403088932557141], [-0.21173109368936346, 0.32853232649984743]], [[-0.07994259206121801, 0.12404283801052113], [-0.50306759171815962, 0.78058429404006369], [-0.22566907313557638, 0.35015917749457887], [-0.50260909070968618, 0.77987286143755086], [-0.46129938694365397, 0.71577470349205186]], [[-0.27604349693442276, 0.42832259864520444], [0.57809556541556995, -0.89700136968953326], [0.34733580927870494, -0.53894323932627342], [-0.20823204348486068, 0.32310302896874599], [0.52852742810120801, -0.82008902210565404]], [[0.26360579604134204, -0.40902365327297685], [0.57556162891150819, -0.89306958980601914], [0.35422742754504977, -0.54963661148498366], [-0.31209892416877855, 0.48426796399445987], [-0.4596172132343444, 0.71316456044377963]]]),self.functionspace)
62397          self.failUnless(isinstance(res,Data),"wrong type of result.")
62398          self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
62399          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62400       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62401       def test_generalTensorProduct_array_rank3_constData_rank2_offset1(self):
62402          arg0=numarray.array([[[0.38108623191570801, 0.24872376923687844, -0.065845150308645906], [-0.6235014045863998, -0.96459708968857694, -0.098700436993527374], [0.13892923114153732, 0.8702954948076822, 0.49493803985759732], [0.65895839674956869, 0.97000956006202399, -0.12211780043512377], [0.58037137836529773, -0.6662236477705421, 0.4335185841622855]], [[-0.15298653017888064, -0.74939122822435755, -0.59166334275954302], [-0.037969270237188102, -0.86778080721755479, 0.28418102143081359], [-0.1122673613274987, -0.36952340366105418, 0.33255137616765906], [0.30328367959702462, -0.1874183289167537, -0.62002165940707599], [0.53791769635878284, -0.43765247155831877, -0.78078427576515153]], [[0.54222909044814727, 0.10372811753000466, 0.065656147556300004], [0.47408499459087872, 0.58974354272939933, 0.82514675239286861], [0.39548877348084366, 0.0076775124586907495, 0.68538962758998356], [0.70291573946684793, 0.55543102139327472, -0.72798544832248413], [0.3625721659231842, -0.81425967592769988, 0.99832631263234428]], [[-0.49269772669459644, 0.065057601552923616, -0.37312746659583773], [0.7050853220607094, 0.85463440889461006, -0.42511434242562007], [0.95900419274121829, 0.093993752904087735, 0.55494346692437224], [-0.49696146258964369, -0.12916382992347319, -0.38062704292982663], [-0.225045722809186, -0.63453903282944557, -0.015057130754259074]]])
62403          arg1=Data(numarray.array([[0.42054180561034138, -0.13505235708154339], [0.70011295442397592, 0.87251439770210948], [-0.11393937763317896, 0.10515980425303928]]),self.functionspace)
62404          res=generalTensorProduct(arg0,arg1,offset=1)
62405          ref=Data(numarray.array([[[0.3418997804253015, 0.15862421272090424], [-0.92628945841282173, -0.76779883303571883], [0.61133776757964076, 0.79263021673060097], [0.97014983908519481, 0.74451153837353157], [-0.27175621663731536, -0.61408151794975385]], [[-0.52158198540466583, -0.69541264594332719], [-0.65589165891374701, -0.72213898831858381], [-0.34381193754131928, -0.27228148058968427], [0.066974348250701185, -0.26968572250297168], [0.0087727888692819833, -0.53661225703698812]], [[0.29317057898192894, 0.024179346873291131], [0.51824294626707679, 0.53730570696842639], [0.093601821224495105, 0.025362488175294635], [0.76741611654156328, 0.31313632840665323], [-0.53134567279681877, -0.65443571671818257]], [[-0.11913841065152637, 0.084065672005065525], [0.94329573901126684, 0.60575245080964335], [0.40587768560339615, 0.010852872375356683], [-0.25605393298686191, -0.085608149697068037], [-0.53717453147953309, -0.52483489165389285]]]),self.functionspace)
62406          self.failUnless(isinstance(res,Data),"wrong type of result.")
62407          self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
62408          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62409       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62410       def test_generalTensorProduct_array_rank4_constData_rank3_offset2(self):
62411          arg0=numarray.array([[[[-0.18532905965709978, 0.63577788814645997, 0.79092484247219041], [-0.42512966287690346, 0.21662686233001516, 0.21963711600053881]], [[-0.51668992975154193, 0.4484496135951328, 0.61313923941418724], [0.15348976750806442, -0.40669063335288236, -0.13827999164230098]], [[-0.29225493130060687, -0.72665852911706441, -0.71703176592647955], [-0.39482504608890068, -0.80751500395734688, -0.042384035638403317]], [[-0.61192940961962572, 0.22708190423222652, -0.23739359654853676], [-0.18565653653627034, 0.41809082835469824, 0.66088285054050599]], [[-0.90904154073472387, 0.0064318777145535577, 0.2516093556415322], [-0.26322289712314606, -0.088054134531274642, 0.21138221724762074]]], [[[0.66596722334548497, 0.31712443778535793, 0.081148052522240999], [0.30734276742476863, -0.90703276562464241, 0.4839812391450915]], [[-0.27267906432713596, -0.039978242271994979, -0.99759478548442782], [0.63226335878585038, -0.36065705578191198, 0.21175875707622516]], [[0.28233983049778266, 0.5872586786763565, 0.53693052211561731], [0.54415640120305042, -0.78790082818395302, -0.72437842750815107]], [[0.80688117211978883, 0.37938913773643335, 0.75637112758316594], [-0.78900688072088632, -0.27181066134075715, -0.95007197265859067]], [[-0.69415772438722323, 0.12840512443477015, -0.84093317835547121], [0.57154009427081798, -0.96369451136450768, -0.66592580747444408]]], [[[0.29680885307278282, -0.49260455323638586, -0.99616107381622232], [0.35371134892469991, 0.074522057093888039, -0.19963576722724441]], [[0.9731176041488121, 0.30651322852301122, -0.90509433104354042], [0.12975759423203348, 0.97913192584369124, 0.62383167720833232]], [[-0.84308546889960256, 0.86313774167139057, 0.28336670828495647], [0.66862454454413855, -0.85815133118331577, 0.78676825019060215]], [[-0.27921553259658327, 0.028661931988191558, -0.38271846303885737], [-0.26172483367436272, -0.25536783523014073, -0.36096953764349671]], [[0.11590842471111151, -0.77292508182603981, 0.81496037339179694], [-0.21575835555644374, 0.31919793077978409, 0.25256459545534349]]], [[[0.61879270895597904, -0.80434956666494251, -0.28456271355950635], [0.81180834908800015, 0.40096771095785066, -0.7107039500438419]], [[0.10192720308500713, 0.8810418011459491, 0.67429741685995492], [0.59205724538936777, 0.41452056142908589, -0.84326470248204721]], [[0.065142700344428262, -0.64257164503234709, -0.59769553518330376], [-0.73572624186220814, -0.66048322934941606, 0.88307043541508778]], [[-0.58226393521574726, 0.98760207902553354, 0.60192357949978903], [0.19263700921864846, 0.58073302402891391, 0.27776711878219418]], [[-0.40460125882277054, 0.43564508131797264, 0.20968787122748345], [-0.67110738273474424, -0.79028737128771964, 0.47432831441186751]]]])
62412          arg1=Data(numarray.array([[[0.58071183671579463, 0.18625231223290695], [-0.047233998923541742, -0.48620767910429885], [0.9993401545506273, 0.72739634825153265]], [[-0.87824023142610885, -0.21646638109155747], [-0.92497105078354469, -0.4366540186335317], [0.47501241265940131, -0.10184585149141956]]]),self.functionspace)
62413          res=generalTensorProduct(arg0,arg1,offset=2)
62414          ref=Data(numarray.array([[[0.93007259701423006, 0.20674394538815061], [0.46719609667872741, 0.29016187215474348], [0.22159475301560225, 0.21969517078713044], [-0.513060907177185, -0.60674228673028829], [0.13627798671452707, 0.084481107021422641]], [[1.251805864670408, 0.30911503952553082], [-1.2744898997145286, -0.75794434117749165], [0.5795924054088244, 0.45764150187082347], [1.6995760195092229, 0.90224473873660027], [-1.1764319913443324, -0.43850811565810177]], [[-1.2742794141441978, -0.51858937230119462], [-1.0771732787352255, -1.1453107082191061], [0.33309742026309275, -0.22071949777198063], [-0.25136338802835934, -0.13940293341695256], [0.93245050270005503, 0.87179223676308903]], [[-1.3084815243262715, 0.020911501292399021], [-0.6125215217154274, -0.14218318002142286], [1.1474208867213673, 0.24752029005880447], [-0.35764952961306551, -0.47435897900469315], [1.4997137905764999, 0.30740025985937131]]]),self.functionspace)
62415          self.failUnless(isinstance(res,Data),"wrong type of result.")
62416          self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
62417          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62418       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62419       def test_generalTensorProduct_array_rank2_constData_rank2_offset0(self):
62420          arg0=numarray.array([[0.68300266448385027, 0.14552810038864483, 0.4535412419965501, 0.055659334307699648, -0.96286014551652577], [-0.68103911576979215, 0.818448016746264, -0.74544158740299249, -0.64922759835911492, -0.65430008774717563], [-0.44343690112035006, -0.67336779865624896, 0.55758149591885653, -0.36417060001914536, -0.95412737766481404], [0.9870180135008384, 0.052682097924853011, -0.28596928844256952, 0.60097832370088344, -0.16393594799436517]])
62421          arg1=Data(numarray.array([[-0.10529893347051567, 0.1836295476681804, -0.79652120690998407, 0.56916668898651945, -0.51102884805796922], [0.32626987993780476, 0.57337566260389705, -0.56309979947125099, 0.9430360472964876, -0.025753469306185828], [-0.20098123027207682, 0.83799665357009001, 0.94517377249581136, -0.89537699951889049, -0.059843003533576189], [0.35221413978378924, -0.82288703972273258, -0.092574182236823344, 0.423599684432721, -0.73851404682541677]]),self.functionspace)
62422          res=generalTensorProduct(arg0,arg1,offset=0)
62423          ref=Data(numarray.array([[[[-0.071919452127669883, 0.12541947033533141, -0.54402610663741136, 0.38874236511324373, -0.34903406485170563], [0.22284319733834657, 0.39161710530865484, -0.38459866340918619, 0.64409613300781932, -0.017589688155827975], [-0.13727071578707073, 0.57235394721692145, 0.64555620501489164, -0.61154487638895738, -0.040872930864149004], [0.24056319594121534, -0.5620340406998543, -0.063228413130163863, 0.28931971314206661, -0.50440706174051064]], [[-0.015323953760914437, 0.0267232592473764, -0.1159162181608807, 0.082829747052702796, -0.074369057501673677], [0.047481435841379947, 0.083442270987825681, -0.081946844146277995, 0.13723824456107406, -0.0037478534665464944], [-0.029248416655268138, 0.12195206112609648, 0.13754934364848459, -0.13030251387166869, -0.0087088386257923034], [0.05125705469275546, -0.11975318772528459, -0.013472144885957129, 0.061645657400723294, -0.1074745463448336]], [[-0.047757409067129775, 0.08328357311669124, -0.36125521745854522, 0.25814056702601018, -0.23177265844427766], [0.14797684657305726, 0.26004951014796635, -0.25538898242019947, 0.42770574013836637, -0.011680260454847552], [-0.091153276795592347, 0.38006604304913133, 0.42867528668031496, -0.40609039641694206, -0.02714127014742208], [0.15974363840628628, -0.3732132100187126, -0.041986209588503826, 0.19211992698696298, -0.33494657802909789]], [[-0.0058608685402796552, 0.010220698382434921, -0.044333840138575206, 0.031679439019107199, -0.028443525494937158], [0.018159964321991302, 0.031913707688769104, -0.031341759987368996, 0.052488758620686859, -0.0014334209576960786], [-0.011186481485286288, 0.046642335889791206, 0.052607742982214017, -0.049836087747646952, -0.0033308217396521684], [0.019604004554124779, -0.045801344841400894, -0.0051526173573812608, 0.023577276448476892, -0.041105200223188025]], [[0.10138814640415568, -0.176809572988918, 0.76693852519234595, -0.54802792098071929, 0.49204931100423877], [-0.31415226407457408, -0.55208057393042265, 0.54218635485921518, -0.90801182572722527, 0.024796989203709464], [0.19351681662586226, -0.80687357979885854, -0.91007015612372055, 0.86212282804890916, 0.057620443090485134], [-0.33913295788519726, 0.79232513481109346, 0.089135990579621099, -0.40786725379364414, 0.71108574259231916]]], [[[0.07171269254226216, -0.12505890477314449, 0.54246209844586324, -0.38762477859299949, 0.34803063481425484], [-0.2222025505351588, -0.3904912542636767, 0.38349298952204802, -0.64224443578983981, 0.017539119964289279], [0.13687607935082019, -0.57070849996541895, -0.64370031026934604, 0.60978676003295484, 0.040755426211515275], [-0.23987160631996979, 0.5604182619111916, 0.063046639213677771, -0.28848795452642328, 0.50295695343355273]], [[-0.086181703264440343, 0.15029123910503581, -0.65191120209181708, 0.4658333477990545, -0.41825054719317278], [0.26703493615913798, 0.46927817390873455, -0.4608679141074643, 0.77182598263004631, -0.021077875877983574], [-0.16449268931940547, 0.68585669915444625, 0.77357559957978128, -0.73281952949645646, -0.048978387558195099], [0.2882689641760337, -0.67349026566727466, -0.07576715585363529, 0.34669432161830377, -0.60443535696351991]], [[0.078494204118103289, -0.13688510150786187, 0.59376003287912593, -0.42428052013501638, 0.38094215570505524], [-0.24321513722262095, -0.42741806410969163, 0.41975800838415611, -0.70297828807493723, 0.019197707040737408], [0.1498197673322233, -0.6246775556756835, -0.70457183734095252, 0.66745125184549015, 0.044609463549031926], [-0.26255506746620733, 0.61341422114426314, 0.069008645359151508, -0.31576882118693422, 0.55051908338494659]], [[0.068362973686839107, -0.11921737022038338, 0.51712355020427259, -0.36951872255672735, 0.3317740317169004], [-0.21182341056893775, -0.37225130438989429, 0.36557993044721948, -0.61224502815237136, 0.016719863027070205], [0.13048256144480067, -0.54405055483028475, -0.61363289834948009, 0.58130345902363967, 0.0388517294626997], [-0.22866714007995109, 0.53424097652003133, 0.060101714003671855, -0.27501260578993442, 0.47946370097493629]], [[0.068897101409442413, -0.1201488291522646, 0.52116389557368881, -0.37240581454664912, 0.33436622012566736], [-0.21347841107256613, -0.37515974635382482, 0.36843624820445653, -0.61702856849484156, 0.01685049722683158], [0.13150203660255516, -0.54830128396274946, -0.61842728228033839, 0.58584524935201288, 0.03915528246307344], [-0.23045374256632928, 0.53841506229659752, 0.060571295560676544, -0.27716131069400524, 0.48320980564039195]]], [[[0.046693432749443375, -0.081428117572109521, 0.35320689566880448, -0.25238951278511224, 0.22660904876592808], [-0.1446801044885288, -0.25425592700289951, 0.24969923009902206, -0.41817698245793833, 0.011420038622233095], [0.08912249393520523, -0.37159863920834424, -0.41912492869577334, 0.39704320200109394, 0.026536596040663184], [-0.15618474667649329, 0.36489847886674692, 0.041050808494847497, -0.187839731380404, 0.32748438035811189]], [[0.070904911031891948, -0.12365022428156537, 0.53635173167999461, -0.38325852043131853, 0.34411037046663345], [-0.21969963082155824, -0.38609270773065429, 0.3791732723937315, -0.63501010722152618, 0.017341556934467626], [0.13533428859953303, -0.56427996189579477, -0.63644958253312678, 0.60291803913347253, 0.040296351554382326], [-0.23716965996181452, 0.5541056344808537, 0.062336473305212158, -0.28523838701794307, 0.49729157798754886]], [[-0.058712736843150273, 0.10238843788372701, -0.44412548607996194, 0.31735681387228609, -0.28494022955785253], [0.1819220477289869, 0.31970365967814646, -0.31397402854078826, 0.52581944995698104, -0.01435965794084345], [-0.11206341502671677, 0.46725142767260658, 0.52701140597148344, -0.49924564680308026, -0.033367351430528831], [0.19638808694441845, -0.45882658658084075, -0.051617651015072798, 0.23619134571675213, -0.41178176698600433]], [[0.038346775783333759, -0.066872482555565507, 0.29006960584838271, -0.20727377463913108, 0.18610168222436332], [-0.11881789794512487, -0.20880655908683624, 0.20506439184410591, -0.34342600318364502, 0.0093786563698083358], [0.07319145522076824, -0.30517374414465559, -0.34420449985215884, 0.3260699791581364, 0.021793062503770277], [-0.12826603462028965, 0.29967126700380581, 0.033712795491465664, -0.15426255124778462, 0.26894510355497925]], [[0.10046859526312482, -0.17520597877841693, 0.7599826904034358, -0.54305752041687261, 0.48758661470862086], [-0.31130302495607137, -0.54707341737708148, 0.53726893503308737, -0.89977651085038923, 0.02457209013488236], [0.1917616941993448, -0.79955554956271957, -0.90181617298898797, 0.8543037085723485, 0.057097848033077249], [-0.33605715356837507, 0.78513905332501255, 0.088327561737084864, -0.40416805608743483, 0.70463647086616454]]], [[[-0.10393194413782532, 0.18124567135950492, -0.78618077935558273, 0.561777774714324, -0.50439467845179853], [0.3220342487613691, 0.56593210749302547, -0.55578964547683463, 0.93079356606226182, -0.025419138115346351], [-0.19837209465409983, 0.82711779232710048, 0.93290353934190906, -0.88375322739947648, -0.059066122469634025], [0.34764170057630228, -0.81220433128271696, -0.091372385452853977, 0.41810051904836631, -0.72892666744008805]], [[-0.0055473687244762884, 0.0096739898121515431, -0.041962408221653889, 0.029984895244752174, -0.026922071815814765], [0.017188581764813464, 0.030206632805025984, -0.02966527877720954, 0.049681117390339875, -0.001356746791893178], [-0.010588112854250983, 0.044147421764078605, 0.049793737238627074, -0.047170338768315258, -0.0031526549722731855], [0.01855537980260745, -0.043351415607765405, -0.0048770021339135158, 0.022316120056221442, -0.038906469333736086]], [[0.030112261078324834, -0.052512411083700451, 0.22778060276946482, -0.16276419305468823, 0.14613855605276344], [-0.093303165406056612, -0.16396783024512326, 0.16102924897694723, -0.26967934742106991, 0.007364701292417516], [0.057474459411218023, -0.23964130673869308, -0.27029067117520628, 0.25605032344026002, 0.017113261138762957], [-0.10072242693338193, 0.23532042121812227, 0.026473373022417132, -0.12113650034172221, 0.21119233647550689]], [[-0.06328237652460135, 0.11035737773957453, -0.47869197972096678, 0.34205684265350056, -0.30711726046867183], [0.19608112551911042, 0.34458634456257337, -0.33841077356253602, 0.56674422289375015, -0.015477276813113713], [-0.12078536286425398, 0.50361782412950262, 0.56802894940057291, -0.53810216825118951, -0.035964347948834664], [0.2116730633110103, -0.49453727372775014, -0.055635076858666192, 0.25457422827059989, -0.44383093389069472]], [[0.017262280481284573, -0.030103483976759621, 0.13057845915240412, -0.093306880725819066, 0.083775998658851589], [-0.05348736206961173, -0.093996882805867141, 0.092312299441756465, -0.15459750840640868, 0.0042219194048533594], [0.032948048513726715, -0.13737777581911834, -0.15494795841351128, 0.14678447722847957, 0.0098104195151069579], [-0.057740558902475335, 0.13490076694922298, 0.015176236324796756, -0.069443215837592054, 0.12106900037347969]]]]),self.functionspace)
62424          self.failUnless(isinstance(res,Data),"wrong type of result.")
62425          self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
62426          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62427       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62428       def test_generalTensorProduct_array_rank3_constData_rank3_offset1(self):
62429          arg0=numarray.array([[[0.70638278312476577, -0.82438987951212561, 0.17139588416761398], [0.96126771236500397, 0.085781911569438929, -0.11435843705231963], [0.7204166899601574, 0.81076164372926063, 0.6426490273034684], [-0.15954153431405604, -0.90409154850056161, 0.6440310081046341], [0.77108250495495256, -0.39380819621396479, -0.9068019363688864]], [[-0.27641450755717467, -0.29850964245528311, 0.34960320605897888], [0.38162085027316817, -0.74929307444559257, 0.18874758287811266], [0.92327624061535851, -0.5848919937862922, 0.83022692491257599], [0.73572350626344929, -0.50034959667614598, 0.97023108861174823], [-0.66392376343353399, -0.17550871846806348, 0.71920247178022167]], [[-0.81330826368888132, -0.72569771264197813, 0.53698881469912374], [-0.026251220241617634, -0.12844730705118468, -0.094543852070865686], [0.96012906017455713, -0.43914348796582869, -0.24941494960563793], [-0.90574178375828329, 0.45170372967315187, 0.11724670138379145], [0.97200712799428302, 0.63262597447066171, 0.71769517566703844]], [[-0.086762068944830517, -0.43041521814161854, -0.88092087307231282], [-0.8274503780500142, 0.74272947206287276, 0.81741498129806578], [-0.22066975471157102, 0.07658523633648251, -0.45260917227070174], [0.90987601200593304, 0.76985554712128379, 0.73873767053381645], [0.64325301951986957, 0.084552084033728825, -0.67818368694193198]]])
62430          arg1=Data(numarray.array([[[-0.42523132155900911, 0.87610379083936207, -0.10512154949994046, -0.71070293576137678, 0.25457124773082174], [-0.75987742505648659, 0.052594419944785864, -0.7181089944458654, 0.42286717633523097, -0.15438945744982213], [0.85870490870540062, -0.90410687117151989, 0.28783773654747025, 0.18586977079651779, -0.56164136979215407], [0.1979061479517219, 0.79442687693863467, -0.99761646568233719, -0.56625829087773205, -0.39667714076748228]], [[0.30600536846542847, -0.74638621887944412, -0.43242916061041936, -0.33751367415179434, -0.71779867879727566], [-0.80079113202615448, -0.19910460008016906, 0.69143432268130511, -0.80616391649915542, -0.19638923731979063], [0.6838337281999658, -0.54571898158933951, -0.069870843220400491, 0.66988396271622275, 0.94068300651771097], [0.80434884428122233, -0.46720047858496705, -0.0083970930814760703, 0.82074744317852333, -0.80284820935511014]], [[0.29790925407653068, -0.63911700366030688, -0.97752066909472468, -0.85355273314982383, -0.20588184019277711], [0.17802762186154175, -0.56640536405757591, -0.85750928514157065, -0.10463252048779492, 0.27639363731105671], [0.033075178115264725, -0.49393164155240332, -0.54701381887005263, -0.99664754836476721, -0.052106838618703133], [0.02754438652411495, -0.25115602935549619, 0.40320329942320932, -0.8475429404485304, 0.48988445858627538]]]),self.functionspace)
62431          res=generalTensorProduct(arg0,arg1,offset=1)
62432          ref=Data(numarray.array([[[[-0.50158339322979195, 1.1246358552018878, 0.1146911515393895, -0.37008088595226796, 0.73628341276939469], [0.15391297615555516, 0.10421206183790355, -1.2242448501581649, 0.94536588353986195, 0.10021597689824387], [0.048497707894188426, -0.27341817284268199, 0.16716852031747603, -0.59177164107218971, -1.1811542419902592], [-0.51857855675292008, 0.90327770485428449, -0.62866923096215133, -1.2218763649177087, 0.46561821579884399]], [[-0.41657985092311556, 0.85123227182205152, -0.026356815519591556, -0.61451739687524709, 0.20668130361276515], [-0.81949798872314439, 0.098250976718017552, -0.53291901078874582, 0.34929989294224217, -0.19686418913911863], [0.88032344191400047, -0.85941631066636981, 0.33325111342089275, 0.35010959214590553, -0.45323527160550259], [0.25608943854317118, 0.75230136747026166, -1.0058065156166529, -0.37699684128375016, -0.50620520277177905]], [[0.13320476673906842, -0.38470944535293, -1.0545310029499584, -1.3341802314735396, -0.53087602537844125], [-1.0822698357975125, -0.48753633117912587, -0.50782678482130739, -0.41620819810364001, -0.092825500590056481], [1.1943072365386604, -1.4112063870253093, -0.20082338890736398, 0.036525330239551845, 0.32456747486796139], [0.81241145635871281, 0.03212497516416038, -0.46638938486603082, -0.28718402373579366, -0.62186759581485551]], [[-0.016952012718868453, 0.12341536123316255, -0.22182681923042835, -0.13118453008406294, 0.47574674248047588], [0.95987581364112906, -0.19316482586415676, -1.0628142860695706, 0.59399451783914026, 0.38019145347189953], [-0.733945952598276, 0.31951522347806921, -0.3350462964941423, -1.2771623028816539, -0.79441684994462158], [-0.74103980363450028, 0.13389565051959554, 0.42642842987750512, -1.1975330446354924, 1.1046355421902332]], [[-0.7185405432589943, 1.5490338526622676, 0.97565439559285372, 0.35890832244276055, 0.66566448968171199], [-0.43200586935510998, 0.63258114139028632, -0.048422705462873417, 0.73842041158660487, -0.29234160379800783], [0.36284036944830711, -0.0343342141969184, 0.74549554382606464, 0.78327706016571763, -0.75626993015403299], [-0.18913450222073672, 1.0243048177655141, -1.1315632919300762, 0.0087046480276374849, -0.43393077384466916]]], [[[0.13034458355640194, -0.24280166810903409, -0.18360296444470625, -0.0012050838468421476, 0.071925689482201544], [0.51132404612314197, -0.15312034891169146, -0.30769206368361168, 0.087181215545152874, 0.19792766860565641], [-0.4299262678704987, 0.24013054818853399, -0.24994319061190584, -0.59977510158057612, -0.1437738431232238], [-0.28518041050656207, -0.16793221924556573, 0.41922344351783986, -0.38478274843963356, 0.5205704257651188]], [[-0.33533519020648261, 0.77296970863847814, 0.099394936626483132, -0.17942841530530351, 0.596131575188248], [0.34364446356310629, 0.062351181794218433, -0.95398511933433172, 0.74567883555390091, 0.14040349035950847], [-0.17844931929612656, -0.029350982865929701, 0.05895108458002149, -0.61912244970923602, -0.92901635896174783], [-0.5219689696243256, 0.60583484977244728, -0.29831571201417068, -0.99104802687665439, 0.54265284280492587]], [[-0.32425378211699868, 0.7148289934818044, -0.65569585425020238, -1.1674085498129854, 0.48394563787398742], [-0.085397125469865637, -0.30523111881862952, -1.7793546691964646, 0.77507330155574694, 0.20179181427938547], [0.42031287061985745, -0.92562907782401393, -0.14752496061967685, -1.047644252634045, -1.1120085920721099], [-0.26486706363329193, 0.79822078187610779, -0.58141395210199975, -1.7065144036345048, 0.51005217822616]], [[-0.17692152167266073, 0.39793301021638039, -0.80939558179577453, -1.182149422547039, 0.34669136846964055], [0.014343769799805367, -0.41122723556696733, -1.706270718972255, 0.61295938787523074, 0.25284102233306566], [0.32170402224877509, -0.87135023924162014, -0.28400097597557139, -1.1654058468982609, -0.93443879551447229], [-0.23012699461846514, 0.57456271062511743, -0.33856802577016154, -1.6495826971392451, 0.58516121243112229]], [[0.44287164117360062, -0.91032336600396191, -0.55734749886026203, -0.082788075266333916, -0.19110670298294458], [0.77308441082216151, -0.40733422988396412, -0.26130592317896817, -0.21451473864845347, 0.33575384012590231], [-0.66634562609308334, 0.34079961806180359, -0.57225306178417135, -0.95776521383202329, 0.17031361584253923], [-0.252754838543993, -0.62607316176071259, 0.95379985097977815, -0.37765097409367804, 0.75659635401666037]]], [[[0.2837506890862152, -0.51409036340010472, -0.12560858780631728, 0.36460520154270165, 0.20330371453035639], [1.2947457236515629, -0.20243906859484653, -0.37820122162150827, 0.18492344810598627, 0.41650573357090176], [-1.1768873700103819, 0.86610883952677198, -0.47713600084922048, -1.1724912657066571, -0.25384472837715605], [-0.72988179455387259, -0.44193560376453966, 1.0339791286136542, -0.59019307381627084, 1.1683083804861483]], [[-0.056308212894663576, 0.13329708971737547, 0.15072249965398093, 0.14270770516838518, 0.10498136364830668], [0.10597575691521474, 0.077743926951954381, 0.011110591623329918, 0.10234116627602542, 0.0031472611587972134], [-0.11350570728598813, 0.14052824224099936, 0.053135423409069182, 0.0033027990422761222, -0.10115804643854719], [-0.11111587325962519, 0.062901226900979157, -0.010853159544487918, -0.010427853352480823, 0.067221385665235028]], [[-0.61696023556196433, 1.3283486921023508, 0.33277646378385428, -0.32126079774837035, 0.6109878770919549], [-0.42232093745228505, 0.27920288487404338, -0.77924055896181221, 0.78612561358162036, -0.13092745512785192], [0.51591696448936941, -0.50521640800454581, 0.44347812534007636, 0.13286258648012877, -0.9393467925578689], [-0.17007909496011592, 1.0305624468824599, -1.0547179614721394, -0.6927170557923561, -0.15048019494537143]], [[0.55830241928676927, -1.2056036095941876, -0.21472795889747931, 0.39118091690976731, -0.57894712301790452], [0.34740554480138075, -0.20398241476965256, 0.86220464885261816, -0.75942353628195047, 0.083533473877249714], [-0.46499671469690623, 0.51447221518457353, -0.35640315128537992, 0.017385429171155445, 0.92750272364461461], [0.18730499391918667, -0.96002903124041494, 0.94706417571487134, 0.78424686160224677, 0.054074867356185767]], [[-0.0059328967457982495, -0.079295369705183805, -1.0773066828645423, -1.5169189152130171, -0.3544134247349312], [-1.1174379784568527, -0.48134298782430662, -0.8760180261452617, -0.17406457883767651, -0.075942205680169239], [1.291016166551392, -1.5785266820138801, -0.157010957475751, -0.11083640051327703, 0.011784262155907881], [0.72098663123578921, 0.29637195840848707, -0.68562547203201574, -0.63945842351446458, -0.54188792657205787]]], [[[-0.35724989837936849, 0.80825491857305987, 1.0563630158853883, 0.95884549769724747, 0.4682299571816575], [0.25377297923802522, 0.58009275700558383, 0.52009859539306613, 0.40246935817004736, -0.14555685911840802], [-0.39797207257046818, 0.74844263010925971, 0.48697596758481865, 0.5735129306401886, -0.31025311243523213], [-0.38763915515151881, 0.35341266509466007, -0.26502069732708267, 0.4424858181450505, -0.051574828362084879]], [[0.82265251090092983, -1.8017192688386796, -1.0332350557363761, -0.36031673154433269, -0.91206620947685058], [0.1795121331067365, -0.65438835723771527, 0.40680727210966783, -1.0341914947987847, 0.20781384025395538], [-0.17559609131642073, -0.060965122284129869, -0.7372038689423881, -0.47093008724939217, 1.1208104460574526], [0.45617126972177591, -1.2096510855014189, 1.1488257706238425, 0.38534965521362841, 0.13237051896442159]], [[-0.017565276011099765, 0.038778444413247182, 0.43251427799538228, 0.51730787404588363, -0.017964946975861512], [0.02577625232361877, 0.22950579239455107, 0.59953516443661292, -0.10769661165792414, -0.10606972785281885], [-0.15208876287404641, 0.38127301575748335, 0.17871531401768234, 0.46137920678367927, 0.21956372677663144], [0.005462503226451686, -0.097411120581888194, 0.037007175811406778, 0.57141892380005954, -0.19567787181195023]], [[0.068748939708841883, -0.24960355406958962, -1.1506869062535166, -1.5370398849513878, -0.47306569396094444], [-1.1763720255349301, -0.52385235897770777, -0.75456001103234638, -0.31316904744102009, -0.087484215808224353], [1.3322020668195222, -1.6076358497980017, -0.19599351870250992, -0.051428757792763458, 0.17467273634628969], [0.81965055217736937, 0.17761465849629551, -0.6163103738275163, -0.5094797610568581, -0.61710805859710927]], [[-0.44969513626173852, 0.93388662449953919, 0.55875603056959355, 0.093166245617353982, 0.24268805503315227], [-0.67723743619267318, 0.4011236886621532, 0.17808524251772473, 0.27480781733912191, -0.30336225998271893], [0.5877530460126732, -0.29273477027459494, 0.55022061624792462, 0.85211148534241077, -0.24640279046057223], [0.17663294471811181, 0.64184463523860869, -0.91587569578275152, 0.27993834754582742, -0.65527790613650572]]]]),self.functionspace)
62433          self.failUnless(isinstance(res,Data),"wrong type of result.")
62434          self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
62435          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62436       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62437       def test_generalTensorProduct_array_rank4_constData_rank4_offset2(self):
62438          arg0=numarray.array([[[[0.96701664630023076, -0.042986887577241228, -0.016145777390025096], [-0.21005474734336915, 0.38975245034314976, -0.45248440640186605]], [[0.29582905987140484, -0.35399496322868562, -0.9643120232950948], [0.31582895608428729, -0.89169478383797718, -0.092877447461645835]], [[-0.25066156534025219, -0.2999531130721349, -0.39239994240983878], [-0.41422028566499836, 0.048704716949362181, -0.28971661619623879]], [[-0.99155981258516146, -0.43741391532976559, -0.13770963563262795], [0.36236761945744833, -0.4450968708013141, -0.94184750590715316]], [[-0.61954789515763875, -0.40216768849219742, 0.1957837738420376], [-0.15478445048892553, -0.98028067152164566, 0.24932307589875324]]], [[[-0.11793718616664584, -0.54153261693063048, -0.050980613047568069], [-0.15780972788673053, -0.23421508554456016, 0.37771147128603277]], [[-0.94254117348565702, -0.55418604833099838, -0.67440973188000242], [-0.53152828605508806, 0.011230988176976986, -0.93042717258244156]], [[0.85407355935485674, 0.47625567518585177, 0.79481699717384591], [0.40576644007496254, -0.58387413676698485, -0.25582199294310137]], [[-0.3534159501352554, -0.13351265268532342, -0.02495023057556689], [0.26076631440297016, 0.93600053557428731, -0.35467333933374645]], [[0.16096031330422367, -0.36904565846303172, 0.034825894730728058], [-0.14328755187427267, 0.06898372984708101, -0.055013500568723339]]], [[[0.85232499239392823, 0.27606520473230156, 0.89252408344586809], [0.88268551755008495, 0.85763604936662996, -0.22716155022387818]], [[-0.95674937358532386, 0.12351417246212493, -0.98275640641172179], [0.95666266595578819, -0.36028736927501837, -0.50015197659584332]], [[0.29007935512477045, 0.51936955360574033, -0.31867099178196168], [0.92281137056560247, 0.39099065173030634, 0.10301546204488043]], [[0.082159266008253296, -0.4233814336895434, -0.88098408725015953], [0.389738485569467, -0.1985753160496726, 0.043266337057008775]], [[-0.53700213534466146, 0.89401807030714942, 0.61766601676298594], [0.66861525518882026, -0.59790481917292082, 0.019555356295074988]]], [[[0.1498390303668542, -0.27143849662457797, -0.99728767081239367], [-0.76943886099454484, 0.3456013254439938, 0.0090499337901737142]], [[-0.34939253428978434, 0.92909490718318333, -0.23201945404444091], [-0.18401301701378103, 0.11205713709714993, 0.15871522027453411]], [[-0.76052616550079932, 0.40481908851700554, 0.25649417147675346], [0.30749019921755605, -0.13206146970398591, -0.13262697871075324]], [[-0.27573971681929077, 0.56881171286438126, 0.09046968562854607], [0.1249205865065417, -0.80474582653720605, -0.2491345426948286]], [[0.34727896473517417, -0.74144370959603445, 0.27827530490095387], [0.25669578124106995, -0.016342861303274336, -0.73878741741584308]]]])
62439          arg1=Data(numarray.array([[[[0.75565637659293095, 0.88502917509960999, -0.60138284826608146, -0.42147466734591688, 0.30784725879123331], [0.11319608184420127, -0.72908105014547564, 0.0052354030448458211, -0.67327054989037038, -0.78283811432594863], [-0.58039014014169665, -0.76463917299644835, 0.14781501079150994, -0.29238108876365176, 0.099004941427819348], [-0.39358884966104091, -0.0042593715444503299, -0.34439439410882966, 0.99306107102168495, -0.03387971020045577]], [[0.098958618203491611, -0.42927588750084023, -0.18917084916571736, -0.86845071376566896, -0.5147991810187702], [0.72229684056950916, -0.47023459816020097, -0.29289920788244705, 0.84547120618162164, -0.18196586984456098], [-0.15030271801979467, -0.8775912695455883, 0.29920454120731166, -0.24729454558002928, -0.72788822809903198], [-0.21936721435393336, 0.079096701483287291, 0.74915194354610115, 0.61370218337294324, -0.5919815292215862]], [[0.99942819894771917, 0.10099132910797781, -0.55398984906651738, -0.86715706791106029, 0.62637621598246307], [-0.75492853050277242, 0.30837692142387341, -0.31133546196286077, -0.20835317778159568, 0.79990373962631733], [-0.61525696500160199, 0.88069750291027082, 0.73487973171118615, 0.95074883401381349, 0.049169805176234371], [0.12854145899375347, -0.53403696027190062, -0.27449389568680771, 0.84798368946077685, 0.66907401967707969]]], [[[0.83244363465108817, -0.60850602717870306, 0.23253081345915327, -0.49322231692726959, -0.52568889766785198], [-0.96434535670121835, 0.64881011342466421, 0.93388304492079932, 0.51419396738944823, -0.38673480028920082], [0.95061789374877148, 0.013059549615391353, -0.78986820115435319, -0.39574616750462699, 0.9519421166563935], [-0.72283001352925336, -0.018465635501565325, 0.37701621434161403, 0.80243101448843679, -0.95186786573928028]], [[0.41273450272636114, 0.76211974437769037, 0.58359788968564486, -0.52843787220906879, -0.65208124666841627], [-0.97771781578443639, 0.79786480722395781, 0.608250093625468, -0.96822661325512693, -0.035373136852943521], [-0.84338765475401312, 0.4445614840912977, 0.52989031342299664, -0.29962885218186419, -0.14391578062063193], [0.60800354582108174, 0.73817757631731129, -0.69433767318349893, -0.33166854559518755, 0.86928115103474046]], [[-0.45737019621477781, 0.089252370990960284, -0.98163210435205173, 0.32698952521377556, 0.059773842277347722], [-0.39105152833836287, -0.22047396906295513, -0.57946497686462317, 0.74294320179717332, 0.53506001313196427], [0.58285336848144231, -0.8410978824000217, -0.047736363406087667, 0.55659881886579288, -0.70017070776611789], [-0.17663204422205303, 0.024991464195766255, -0.6695759288965657, -0.90665509670076849, 0.53472585247493765]]]]),self.functionspace)
62440          res=generalTensorProduct(arg0,arg1,offset=2)
62441          ref=Data(numarray.array([[[[0.90330025499992339, 1.257132907094439, 0.058316964024706319, -0.60655402873497466, 0.13893616067044767], [0.0890442348354403, -0.41535342308484108, 0.32577956372777728, -1.5055917734352617, -0.93676800766754087], [-1.336978345806572, -0.16480405388649139, 0.51225407303364845, -0.57296254035889982, 0.18700002927190168], [0.095475535925422753, 0.2813805033940629, -0.4076480934454989, 1.0326583047132878, 0.27867619227981422]], [[-0.83789038829496909, -0.56365985852197709, 0.067498331586608618, 1.3040141628669066, 0.079162394750682041], [1.1093614625146277, -0.83265606189713581, 0.21185125730575033, 0.65920922843643626, -1.0788230704839528], [1.4729529207951699, -1.0789763375929331, -1.4883723321662257, -0.82527842275302143, 0.73355217494357972], [-0.91677331034757525, -0.18066383827359675, 0.69801830134936005, -0.10780615329084001, -1.5710851195000379]], [[-0.80347770093974025, 0.13060732062183558, 0.64137165776913729, 0.79024535176665456, 0.00013424759512056447], [0.51633088414331141, 0.036778284025374655, 0.019383711543771248, -0.47847066106299563, -0.059618740717225657], [-0.17171241132219123, 0.36923897916208043, -0.048348032643010283, -0.23753149179677469, -0.024250646971213319], [0.49421454836008871, 0.22325955963522556, -0.026670642287844992, -0.85161685386038943, 0.20521654407486442]], [[-0.3814785037484108, -1.3474777123260806, 1.5043945583983405, 0.66570963070495237, -0.1228778416159885], [0.12982007383792427, 0.97378165780275028, 0.77924727280412709, 0.24400206791448908, 0.11733012968807133], [0.89686620919076443, 1.6198209513341872, -0.85575847963423257, -0.26711680397013771, 1.281911459759121], [0.10232954400709776, -0.31562256693648405, 1.127903022780905, -0.077566359409252827, -1.0350738450801777]], [[-0.95976938203565032, -0.98655591574202173, -0.51262376339488103, 1.1164978876055525, 0.87443788260308919], [0.50178777154757981, -0.23633742515921516, -0.83168379178415563, 1.0910874681712781, 0.94273361625430208], [1.1245035987587675, 0.35157416669171204, -0.47711504409524069, 0.96048781365484159, 0.060184779250913978], [-0.17093384148206392, -0.8482590926270096, 0.31369148854323614, -0.72116425446798416, -0.18142588870688409]]], [[[-0.59445108859045148, 0.074180318091149777, -0.34254643239340921, 0.88932121866873859, 0.46880421750616674], [-0.13253591428508724, -0.047624173211011492, -0.33483864732597479, 0.058422010901733434, 0.42150033574975476], [0.44887734540762314, 0.09664894202639418, -0.23441651513534512, 0.46279485794684705, -0.00098884173034963219], [0.063610196660089255, -0.17564427838481594, -0.50085841752838245, -0.884092979918078, 0.43905051888335722]], [[-1.4533851007575733, -0.41543257238383779, 1.8415749460852813, 1.415346456311172, -0.21081861368002958], [0.86759341346133734, 0.60904881973394698, 0.41694969247539793, -0.66888504427037232, 0.0065660697886527619], [-0.011782430277580747, 1.3937334436579045, -0.33054306624455215, -0.53945537600512583, 0.42076604578832277], [0.96123066731916962, 0.31519280166459418, 0.50935645369491866, -1.4346577969191001, -0.073044985512288496]], [[1.7006762985229442, -0.083021486686167573, -1.0393108609502271, -1.4380490964090382, 0.66773763455013169], [0.12025046694499411, -0.74772269032254479, -0.21044142223723311, 0.24593916121807283, -0.39263718687196886], [-0.32724072149202948, -0.41012006730766837, 0.23515840900729507, 0.26015575011846159, 0.42639153195885443], [-0.94157311935455323, -0.83531811330018158, 0.57415589003541045, 2.5656127766560393, -0.80966037460036033]], [[0.46040078102201765, 0.26502175715851162, 1.2066600440329966, -0.45266756667764069, -0.82432469895231109], [-1.1455230594091188, 1.3069430131001956, 1.063391798310201, -0.90541640170837301, -0.042723765947751735], [-0.50770747197339061, 1.0832618849242321, 0.19641421967059094, -0.46843310897747392, 0.42282663734664933], [0.608430339835076, 0.68152484971025562, -0.28556467988890288, -0.23368658432335787, 0.4500966472751512]], [[0.054271110460455213, 0.43924920539887441, 0.014663723250750223, 0.23868791470998529, 0.28840301644949196], [-0.18238632073887079, 0.041126747212011261, 0.038117278855214667, -0.60898478663182309, -0.0074562029580845617], [-0.28583462856447345, 0.30653374286440399, 0.091323293231295954, 0.082727439838833308, 0.17846177815330419], [0.17731294730751654, 0.0037190712587467176, -0.40654861448052515, -0.12508875282282053, 0.40325595714181955]]], [[[2.7560564354992882, 0.82218874483804316, -0.13049116252757834, -2.3357879965722241, -0.35752105037580834], [-1.978818873794737, 0.83106053856914808, 1.1233429958437879, -1.0716829724231332, -0.49678112963460147], [-1.1019309146847467, 0.47591476985524284, 0.63257592924512152, -0.20163666323606286, 0.80321503031824637], [-0.35776073693187493, 0.15267588128165899, -0.4423139380018935, 2.4024789653792613, 0.18872036922846666]], [[-0.81652611212026993, -1.9003795063091233, 1.5996002925450772, 0.70318147340633452, -1.2715592166711749], [0.34811584062046041, 0.77991009743680617, 1.2288675188252622, 1.4225047536298625, -0.68444758676873507], [2.0631384147631882, 0.030662441629308035, -1.7493484515429103, -1.234190557306349, 1.0797809157263512], [-0.59907163666018981, 0.2425519873208592, 1.6375187923915733, -0.36705392362922395, -2.189492157579112]], [[0.83455521394118026, -0.25276735184494104, 0.24548227946030882, -0.92505060968769992, -1.1115905502945811], [-0.663923082571791, 0.33398712959437787, 0.98853347275273296, 0.48267735225915259, -0.89209320845787143], [0.55716991578052621, -0.85902817253225916, -0.56254382274827386, -0.9412399082207239, 0.38507219042049645], [-0.7165749705947797, 0.48418169105102515, 0.38411688516105474, 0.85399061053310565, -1.0139281237276876]], [[-0.63760570391951876, -0.21914572920742567, 0.45100493965695626, 1.0238640745989982, -0.38138631876899054], [0.16996181563203627, -0.047596412539511974, 0.61683519326293956, 0.19509512339055107, -0.8125300166392172], [1.1211688267220106, -0.58672718166128268, -1.1770811750773746, -0.82757311600503081, 0.64228349764083603], [-0.46279533783312116, 0.28394071706912655, 0.15219849308553135, -0.58592928860326976, -0.86205479888302317]], [[0.60085906760176444, -1.6574501641473516, -0.40101749432422934, -1.0931173051632546, -0.19909530122596408], [0.050825216676943639, 0.1140394766961501, -0.2075687978356143, 1.9259553896637978, 0.52481459085475013], [0.94853515391758347, -0.10351427448205654, -0.20384787569148682, 0.44860081993392426, 0.035298296050985507], [-0.75564203661649432, -0.71007292890493856, 1.3392831862343728, 1.2562495096555977, -1.2435084338479396]]], [[[-1.4123638413495192, 0.88082201391811743, 0.52761512866538274, 1.2372174753999321, -0.25914715414351253], [0.97434816781917266, -0.51461738152226477, -0.12281838143372893, -0.84612521882267189, -0.57545526025067872], [-0.45022242279692309, -0.61868886575830973, -0.0014995961606511731, -0.71886739499265839, -0.62515999076223661], [0.63707874834143152, 0.78002986382896911, -0.51731758601627564, -1.6037186319783758, 0.52601888068465874]], [[-0.58348776274032732, -0.51995288397062389, 0.029705083743318345, -0.37497341764422143, -0.69803803793070751], [0.81251656537546357, -0.31868217438452845, -0.39738227313773633, 0.9839019943920001, 0.070983593576920967], [0.028964105265115281, -0.83862719008850184, 0.25298509487757276, -0.22060895966452732, -1.0247014638512937], [0.076986999315276139, 0.28896600801931199, 0.62659673547863148, -0.30225280686898254, -0.33597352854647378]], [[-0.016167039759837812, -1.1205567964718828, 0.36331330484608626, -0.3786860266688048, -0.36532158214266713], [-0.10286771280667467, 0.56659850531864964, 0.081277588634710379, 0.98830209981089545, 0.54166713336604322], [0.54912927043516357, 0.50901468822615359, -0.10932480023663743, 0.21017678922742628, 0.047232997078715998], [-0.035630094461906611, -0.20819550951548288, 0.79121374748362905, 0.12147953819314239, -0.52067309096652559]], [[-0.17586800599078584, -1.1906416552326395, -0.18793836103351905, -0.17403889463371558, 0.12315710698803597], [1.0751122886138076, -0.54464053418125113, -0.42467529467115561, 1.306028632557374, 0.031575596200931727], [0.67113609493013948, -0.35524743404281223, -0.31728812346728547, 0.078991225439029922, -0.027713067047217099], [-0.54020097930021371, -0.6047268465591612, 1.2689331606252341, 0.7449995631296531, -1.2185300808725927]], [[1.0120063584374965, 0.4191446390796052, 0.55261969571874214, -0.10331801276320174, 0.49446311281742206], [-0.64897052716040293, 0.49766247364225907, 0.790234174601948, -1.3197236250181446, -0.40834300199315132], [-0.43412886619661362, 1.2476972491028164, -0.14216013386668125, -0.16151067770050098, 1.3517420540172669], [-0.0032571742383116498, -0.24400160362175846, -0.14863958999155374, 1.0070429635456934, -0.04025369111317989]]]]),self.functionspace)
62442          self.failUnless(isinstance(res,Data),"wrong type of result.")
62443          self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
62444          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62445       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62446       def test_generalTensorProduct_array_rank2_expandedData_rank0_offset0(self):
62447          arg0=numarray.array([[-0.81433301389148904, -0.93934382929815197, -0.93544977448423117, 0.14135179042111101, 0.44057893698742756], [0.79725768777419703, 0.58893728631278353, 0.97069503679529356, -0.94887572835556311, 0.86462049489052029], [0.41122657689151465, -0.79929627126517766, -0.90788699057885691, 0.41553040174095845, -0.42990604400303534], [-0.011581429924740982, 0.62736193318040279, -0.9141577229393143, 0.088757077280455787, 0.50742433378050711]])
62448          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62449          arg1=msk_arg1*(0.469206546896)+(1.-msk_arg1)*(0.96112219683)
62450          res=generalTensorProduct(arg0,arg1,offset=0)
62451          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62452          ref=msk_ref*numarray.array([[-0.38209038147126639, -0.4407462744928537, -0.43891915848019097, 0.066323185481026808, 0.20672252165888844], [0.37407852666665237, 0.27633323044899799, 0.45545646630360087, -0.44521870393494078, 0.4056855967829095], [0.19295020213504338, -0.37503504338701416, -0.42598651982111546, 0.1949695849310952, -0.20171473039629348], [-0.0054340827431032775, 0.29436232632144371, -0.42892878849847338, 0.041645401743325379, 0.23808681946404817]])+(1.-msk_ref)*numarray.array([[-0.78267353526280881, -0.90282420479400494, -0.89908154227667192, 0.13585634333543117, 0.42345019579450477], [0.76626206031336364, 0.56604069841620464, 0.93295654621693958, -0.91198552455602844, 0.83100594947365858], [0.39523899097696757, -0.76822138815663688, -0.87259033885878035, 0.39937549257103772, -0.41319224144281125], [-0.011131169371702969, 0.60297147942603846, -0.87861727892079788, 0.085306397100026368, 0.48769679040826097]])
62453          self.failUnless(isinstance(res,Data),"wrong type of result.")
62454          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
62455          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62456       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62457       def test_generalTensorProduct_array_rank3_expandedData_rank1_offset1(self):
62458          arg0=numarray.array([[[-0.66062121990566602, 0.3487046122130717, -0.3741080932392753], [0.61827278703237631, 0.36431531893557834, 0.71176692172481304], [0.84840622416903599, -0.33548710783458779, -0.53443812777973854], [0.75098862149117496, 0.25641432331462233, -0.21832499449869802], [0.90754491710051144, 0.24073370184230813, -0.80612776781447493]], [[0.10019621897718323, -0.62627301679314118, 0.28990920661253683], [-0.62607041314515577, -0.66029417662992862, 0.45804771096761265], [0.74845236100037527, -0.90243285916779503, -0.63368993078518843], [0.91242519732992688, -0.12454133665784495, 0.43394199330630512], [-0.27009794576819202, -0.66751186797236639, -0.77945138327643448]], [[-0.094622886712298016, -0.51306303778521634, -0.5420320000874892], [-0.68115892351825424, 0.64936941838295725, 0.80942965531559863], [0.87674260025334294, -0.30039594665627711, -0.085298718329851919], [0.31078326345431972, -0.14262545415178018, -0.492357588574037], [0.64554062655795685, -0.41025402124060051, -0.17338476540245695]], [[0.048131080706030227, 0.040001339127085034, 0.7186814371140422], [0.1268269237183155, -0.91532412029337329, 0.30911166323109129], [0.40468872011673573, -0.59949274272921582, 0.36732551275192238], [0.39851405692653574, -0.85093342873953626, -0.10453492206842463], [0.2968643023427775, -0.28552263862145, 0.17876981551361459]]])
62459          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62460          arg1=msk_arg1*numarray.array([0.49798925631841384, 0.59224788443574727, 0.96044299055245497])+(1.-msk_arg1)*numarray.array([-0.34488148758005877, -0.74547850358154721, -0.092870833697350053])
62461          res=generalTensorProduct(arg0,arg1,offset=1)
62462          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62463          ref=msk_ref*numarray.array([[-0.48177219699341278, 1.2072697332009916, -0.28949169895067745, 0.31615639501341197, -0.17971812011617616], [-0.042570963312932253, -0.26290545532199661, -0.77036576924939593, 0.79739514808150447, -1.2784569843328875], [-0.87157251483418763, 0.82278887729022776, 0.1767749754595665, -0.40258429203549639, -0.088025962217455483], [0.7379120182755573, -0.18205619814481294, 0.19927754012909243, -0.40590763729393309, 0.15043327070150506]])+(1.-msk_ref)*numarray.array([[0.0026279670554923001, -0.55092246473270379, 0.0071325409423870015, -0.4298774147209703, -0.41759148300288162], [0.40539314062706022, 0.66561593734232727, 0.47346824596824494, -0.26213622476958437, 0.66315582957925034], [0.46545011131834985, -0.32434424637485798, -0.070511808320289235, 0.044866475646684251, 0.099302929975429416], [-0.11316420137403967, 0.60990673950137875, 0.27322547834946581, 0.50662070369285894, 0.09386548537010915]])
62464          self.failUnless(isinstance(res,Data),"wrong type of result.")
62465          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
62466          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62467       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62468       def test_generalTensorProduct_array_rank4_expandedData_rank2_offset2(self):
62469          arg0=numarray.array([[[[-0.13266231586553312, -0.70700919844231946, -0.34992773902516006], [0.89967015143973272, 0.1457485219794783, 0.38966687412722067]], [[0.040444971148584807, 0.50522666400725846, -0.3357570114906363], [0.90993119826227042, -0.60813069548423648, 0.88584777456520269]], [[-0.79926801915197254, 0.20944192000324557, 0.64583921579226078], [-0.7056688484300071, -0.85017971548357685, -0.24994041062409278]], [[-0.15576728745822122, -0.2471177515033105, 0.34419352313530105], [0.085920338367611704, -0.5944688739276951, 0.73381663953725007]], [[-0.20078145225506971, 0.63096346228775357, -0.12141470877010541], [0.25463636531792821, -0.37649429160098502, 0.81911586785225654]]], [[[0.44083469084169313, 0.41332047944720096, 0.0080624264688025082], [-0.35708374872150195, -0.25100655527290661, -0.044894225036805624]], [[0.89096799417722106, 0.29285447944591558, -0.26631741546442855], [0.85651507600321763, -0.71227493650751139, 0.77408391733688542]], [[-0.65887737392613843, -0.25022955727206786, -0.074950375687919957], [-0.7028810354217323, -0.68255052736011046, -0.04500385912814564]], [[0.99003836091164676, 0.73329953239352386, -0.78352674351732055], [0.12015801803036541, 0.51032770884900169, 0.29131161819417928]], [[-0.95239218460596642, -0.93112280871230069, 0.28820498583761966], [0.37771680873775071, 0.94089113989507545, 0.14659299976835682]]], [[[-0.86107042647843413, -0.26344390544163754, 0.11479859322251795], [0.83554482492942639, 0.31124837241278547, 0.45050804645001352]], [[0.32124208521445774, -0.70375997368099008, -0.57644987367534162], [0.53991790905639991, -0.11380635419070106, -0.27409954021782168]], [[0.080181377859597447, 0.73106298617922016, -0.3901474881811271], [-0.27084022088192961, -0.92605907831553358, -0.2173192043676142]], [[-0.016646285095316848, -0.80141229286310089, -0.47925253333034923], [-0.055078481560346004, 0.92256568500507496, 0.019524986069558103]], [[-0.51414226967275356, -0.5011668899150068, 0.58466379860721607], [-0.27670390325906657, 0.99288484718259395, 0.29237209016917287]]], [[[-0.54263055609504329, 0.79409415061045152, -0.63213431132009013], [-0.10225607743099752, -0.61655866598087883, 0.085622027266618606]], [[0.47722665446323687, -0.97619715125846263, 0.31171324266652434], [-0.52805503413135146, -0.19866125111812361, -0.64968062238803648]], [[-0.3910743848465037, 0.090717362484936448, 0.57806074015755837], [0.95764540904923789, -0.33697432064554267, 0.39935972371362949]], [[0.24034182894920897, -0.16399835734393675, -0.60039151756841869], [-0.84962773720507312, -0.55321693524892868, 0.25673049387928026]], [[-0.25299297366935436, -0.7016294255271196, -0.83232701983995683], [0.63062221681474995, -0.67253514037625006, -0.59646139246471752]]]])
62470          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62471          arg1=msk_arg1*numarray.array([[0.87718677890473784, 0.24599519369013967, 0.48905455275996701], [-0.85160004751898177, 0.38987007224679071, -0.48493196636163871]])+(1.-msk_arg1)*numarray.array([[-0.35333790076790739, -0.36598611401828296, -0.58002698401327701], [-0.54225351955891088, -0.69732864224989233, -0.67729355539512182]])
62472          res=generalTensorProduct(arg0,arg1,offset=2)
62473          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62474          ref=msk_ref*numarray.array([[-1.3597223285749047, -1.4460076831360347, 0.056957067865173766, -0.68988390779277453, -0.84113493829401231], [0.72031541862366777, -0.65913860174221384, -0.32187730254462843, 0.62101801119707023, -0.9494555951100826], [-1.5726520936940527, -0.54449187574054747, 0.034358474422370777, -0.049008808867455428, 0.19260561662698575], [-0.78461051745282817, 1.0182124025686587, -1.1785953827484135, 0.26022113362880606, -1.311568914193908]])+(1.-msk_ref)*numarray.array([[-0.34480508319812958, -0.67377398932026222, 0.97594378984940644, -0.1832210931706339, -0.51987547199710438], [0.087360963924433196, -0.75956279501907109, 1.2554427033610018, -0.78205458656925841, -0.4500874990938849], [-0.64116637719477487, 0.4506497517186635, 0.87022652906020914, -0.049522187556027074, -0.71437981641844461], [0.69516095535443001, 0.8727466255023093, -0.78509923568732032, 0.99594826152768345, 1.3599511210678643]])
62475          self.failUnless(isinstance(res,Data),"wrong type of result.")
62476          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
62477          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62478       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62479       def test_generalTensorProduct_array_rank2_expandedData_rank1_offset0(self):
62480          arg0=numarray.array([[0.59141962192080322, 0.58934437327482025, 0.42645974016957378, 0.77987378388238593, -0.67865648154033797], [-0.37051635475127265, -0.9636783377453142, -0.90378638702751579, 0.98567625452474084, -0.14249158015046226], [-0.5347583801132878, 0.73905395766371162, -0.31032577254137017, 0.38380712716218679, 0.29832553975994114], [-0.090142678308983148, -0.77188881866096737, 0.50205889088181288, 0.71013844018097205, -0.40229309632394639]])
62481          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62482          arg1=msk_arg1*numarray.array([-0.39159322248585271, 0.18935736479320431])+(1.-msk_arg1)*numarray.array([0.15586148322569149, 0.77422735158555955])
62483          res=generalTensorProduct(arg0,arg1,offset=0)
62484          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62485          ref=msk_ref*numarray.array([[[-0.23159591558933199, 0.1119896610939165], [-0.23078326228459212, 0.11159669747902251], [-0.16699874391348285, 0.08075329258890511], [-0.30539328816273897, 0.14767484458727353], [0.26575727856729159, -0.1285086029443063]], [[0.14509169334076225, -0.070160000548485035], [0.37736990571749751, -0.18247959054374821], [0.35391662373495097, -0.17113860858350144], [-0.38598414083712884, 0.18664505809604065], [0.055798737048220678, -0.026981830122511194]], [[0.2094077573198769, -0.10126043765933485], [-0.28940852087245578, 0.13994530986318882], [0.12152146928988689, -0.058762470515849173], [-0.15029626973847818, 0.072676706188281953], [-0.11682225946442673, 0.056490138059452751]], [[0.035299261882520284, -0.017069180019990589], [0.30226642990024621, -0.14616283261498034], [-0.19660285895808219, 0.095068548548378998], [-0.27808540020154382, 0.13446994367102541], [0.1575352499733057, -0.076177160594401189]]])+(1.-msk_ref)*numarray.array([[[0.092179539481354072, 0.45789324755547639], [0.091856088149329065, 0.45628653329241553], [0.06646864763887278, 0.33017679518935494], [0.12155228468474104, 0.60379961426626871], [-0.10577640581360619, -0.52543441033935001]], [[-0.057749228610909836, -0.2868638960582135], [-0.15020033507345354, -0.74610612721292902], [-0.14086548680129746, -0.6997361408273951], [0.1536289630105703, 0.76313751606146396], [-0.022208949029423549, -0.11032087872313388]], [[-0.083348234291825155, -0.41402456437329477], [0.1151900460252835, 0.57219578832080176], [-0.048367835191456522, -0.24026270100344779], [0.059820748112090018, 0.29715397558244194], [0.046497461111089426, 0.23097179255867178]], [[-0.01404977154317448, -0.069790927091993082], [-0.12030773616182519, -0.59761743579038695], [0.078251643399484955, 0.38870772542740945], [0.11068323058218529, 0.5498086038004143], [-0.062701998684506266, -0.31146631852804341]]])
62486          self.failUnless(isinstance(res,Data),"wrong type of result.")
62487          self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
62488          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62489       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62490       def test_generalTensorProduct_array_rank3_expandedData_rank2_offset1(self):
62491          arg0=numarray.array([[[-0.22871103796613901, -0.92973045825020884, -0.15288851336359355], [-0.63297950247153345, -0.66106052197644205, -0.43121395026599996], [0.99482546115536907, 0.024121707053310626, -0.09479089364989024], [0.75852823233647171, -0.026928192024048725, -0.91287747164993993], [-0.068007240244599698, 0.91212769021964224, -0.73576372051551897]], [[0.12958439586976445, 0.93371660308018223, -0.48114246136455008], [0.014272640002764625, 0.46038411263568735, 0.64996030091021573], [-0.43504821112376058, -0.70679989418837663, 0.35914115743545083], [-0.30728972213862504, 0.11623429073856006, 0.33888311226220424], [0.45044071394456497, -0.93580726433719197, 0.80799765913147414]], [[-0.85769421269938628, -0.0085587011390113599, 0.87677292795525075], [0.27209687818380135, -0.93480832268014447, -0.010471009277434717], [-0.32073296777969507, -0.79673954322151253, 0.94082544868244833], [-0.29063136404912271, -0.91941188394693474, 0.58690002394098562], [-0.97722517751744742, -0.8760872441709382, -0.038528180529169287]], [[-0.79062160519296043, -0.11281855748111091, -0.46372665726770368], [-0.54278970506447499, -0.31419517602605129, -0.53025243174666148], [-0.25550754806518827, 0.09937057343263378, 0.58887818562796657], [0.5403464567829912, 0.57114984044669947, 0.49508177844379575], [-0.33597791407400379, -0.069036735476694533, 0.44415880896118298]]])
62492          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62493          arg1=msk_arg1*numarray.array([[0.82912317178656258, 0.88451168862468443], [-0.27709643920136218, 0.47012166437472058], [-0.53330232421180512, -0.13992522635993043]])+(1.-msk_arg1)*numarray.array([[0.34646784324897739, -0.97101053550629657], [0.57904083499645731, 0.95559712039260614], [0.15567153659832544, -0.99462554999972586]])
62494          res=generalTensorProduct(arg0,arg1,offset=1)
62495          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62496          ref=msk_ref*numarray.array([[[0.1495311776991935, -0.61799105701075974], [-0.11167305411940071, -0.81031893183936521], [0.86870100649283921, 0.90453852285164882], [1.1232147173599738, 0.78600214805998048], [0.083250788428771982, 0.47160969408143089]], [[0.10530627230357767, 0.62090328412234919], [-0.4623623608481901, 0.13811501996411529], [-0.3563876327599475, -0.76734007823926464], [-0.46771628855930275, -0.26457538899926492], [0.20187266460161224, -0.15458244748000463]], [[-1.1763476007310099, -0.88534683763310862], [0.49021809780794062, -0.19733561699450922], [-0.54689784360438132, -0.78990179293295149], [-0.29919858602764382, -0.77142440241000632], [-0.5469322147195933, -1.2708436209178378]], [[-0.37695456830688312, -0.68746544160044165], [-0.080192303115630137, -0.55361810614649354], [-0.55343256579982225, -0.26168206684589057], [0.025721917954347584, 0.67717824061422194], [-0.49630816533073885, -0.39178107898714781]]])+(1.-msk_ref)*numarray.array([[[-0.64139331072174721, -0.51430009950059152], [-0.66921581791109797, 0.41181864690434633], [0.34388624125935213, -0.8486539252411881], [0.10510407916878606, 0.14569984948893866], [0.39005938856935829, 1.669471736160056]], [[0.51065668137000342, 1.2449856688023657], [0.37270653056950165, -0.22038427327381571], [-0.50408816048994265, -0.61019051836764571], [0.013592848295610006, 0.072392909250638571], [-0.26002515990080854, -2.1352925220163872]], [[-0.16563071255249759, -0.047409309081218987], [-0.44864941129118074, -1.1470943433054122], [-0.42600864671994965, -1.3856959517566314], [-0.54170781831241976, -1.1801269914213228], [-0.85186513008286779, 0.15003060793832348]], [[-0.41144055540267621, 1.1211272011198912], [-0.45253622636442231, 0.75421313329493334], [0.060686042728468323, -0.24265453436639073], [0.59500189320135732, -0.47131394569572244], [-0.087237747939695659, -0.18150491100978822]]])
62497          self.failUnless(isinstance(res,Data),"wrong type of result.")
62498          self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
62499          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62500       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62501       def test_generalTensorProduct_array_rank4_expandedData_rank3_offset2(self):
62502          arg0=numarray.array([[[[0.14893314501070809, -0.69760666997362164, -0.42815470643029019], [0.090927641626380895, 0.99749314275541323, -0.35639022176351354]], [[-0.1737447052018013, -0.22184678745473074, 0.5100517138070626], [-0.017517004274634207, -0.89759806665857012, 0.50327831775255083]], [[0.9867363785779748, 0.093849746933894584, 0.34104159342214557], [0.62786397265074689, 0.29347739488979352, -0.12264842613109894]], [[-0.38739503430313471, 0.19700474038292737, 0.43296492920525309], [0.77068274574308959, -0.13087912149780356, -0.41521813690915588]], [[-0.36650312137982821, 0.034328509584073741, 0.4021722812232611], [0.15328147110688817, 0.051270838064447988, -0.68450628547488113]]], [[[0.958348141361685, 0.24182731023715576, 0.1313183955901267], [-0.89335754276741164, -0.59232542911077224, 0.18333772703253826]], [[-0.51150265066853251, -0.31892735825887075, 0.80563866105049531], [0.46037590616274482, -0.056482381159243422, 0.21438845411959662]], [[-0.35960469765759373, 0.1246796517264861, 0.66492484689584286], [-0.71837464489725877, -0.65580447755235038, -0.29885425605192339]], [[-0.16516953260686562, -0.92503942872228895, 0.48139229524494653], [-0.66697573934869658, -0.28366664530588559, 0.53152753008167508]], [[-0.35909735631617234, 0.32320281298133735, 0.97061202000060542], [0.81083339176227165, 0.31963285133034414, -0.32333412615701507]]], [[[0.33021483158105003, -0.62895846196947636, -0.14799076865469574], [0.98193457924161098, -0.60407588317310301, -0.41791047757761568]], [[0.05703031096397071, -0.46344908342452129, -0.40027892684888844], [0.20274943459740169, -0.90690664508480023, -0.78586667206046346]], [[0.60561441708695107, -0.15150861348414479, 0.83168718214608206], [0.57743963754118188, 0.12152788001599579, 0.19010353367262267]], [[-0.63651396686707007, -0.1890284106344271, -0.61081817651823855], [0.34448510097471852, 0.53062866052042956, 0.10130966328714841]], [[0.88614421547786359, -0.030906544965969784, -0.65614536270981194], [-0.097714076151187435, -0.65844445500697946, -0.51303552967958876]]], [[[0.35187316835848015, 0.93597337010189308, -0.92216774698486259], [0.02362952487641401, 0.58357447456445888, -0.47464467959195655]], [[0.78381349615829854, 0.56776696960257911, -0.18390161097514479], [-0.72771403197844897, -0.86231287303401238, -0.3644021111673974]], [[0.65907173280872877, 0.42793602209735049, -0.45000007256823338], [0.63075678381486489, -0.84233922529611571, 0.74065376157484586]], [[0.74852743283869749, -0.34987796908281577, -0.78660152385299709], [-0.06470268631275844, -0.67233606070663088, 0.66904163859614552]], [[0.28279381079351218, -0.78123330948478498, 0.34032189742496155], [0.18612057645602409, 0.37672018543279373, 0.84018051813095074]]]])
62503          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62504          arg1=msk_arg1*numarray.array([[[-0.29908817629705942, -0.86673344737030256], [-0.067985379936349455, -0.20239147139135771], [-0.8114242256892823, -0.82446530215470104]], [[0.74481225542241569, 0.98006121220964171], [0.52133998287368666, -0.71367805261910755], [0.8305368419947412, -0.32232679088719118]]])+(1.-msk_arg1)*numarray.array([[[0.34328153169108089, 0.76481770993414888], [-0.65077645745743729, -0.5382708404913803], [0.017362356083489017, 0.37021804909288747]], [[-0.029309748918828982, -0.48814465214056124], [-0.31350328137550632, -0.51631233795607723], [0.44998674534453209, -0.81635152578070702]]])
62505          res=generalTensorProduct(arg0,arg1,offset=2)
62506          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62507          ref=msk_ref*numarray.array([[[0.64205988341270892, -0.14279719087071341], [-0.40983044727517992, 0.23617852341944096], [-0.059452760447894118, -0.70997914772196591], [-0.087918925294529104, 0.9214893452880879], [-0.64666165108715867, 0.31340469179867975]], [[-1.231544085450863, -1.4997537129231853], [0.012456668884252176, 0.26606717298680643], [-1.5656198139546014, -0.40144927324434365], [-0.48152923159154687, -0.68906915032808214], [-0.20013427091591784, 0.11636292156813489]], [[0.13341787287266349, 1.4912762801029722], [-0.63524096659444917, 1.4736362577417337], [-0.19435341848091389, -0.76202049576091924], [1.3162137053863414, 1.0198077133219361], [-0.57266879225749012, 0.31869015146414065]], [[0.50702601369874167, 0.025546820962176947], [-1.4180248665231372, -0.62298203000892916], [0.78471750641468119, 0.69376605556645443], [0.59513511986581369, 0.27133307068457835], [0.72521178170919209, -0.72483555222623641]]])+(1.-msk_ref)*numarray.array([[[0.021924905337876055, 0.062433278042009543], [0.60196694784813842, 0.23650074532996435], [0.11797562735749643, 0.47252641797971473], [-0.42207445827776835, -0.21170325476999291], [-0.46975625335308463, 0.30760777756045393]], [[0.46826729235976405, 1.2436540823763376], [0.14663466064034847, -0.29185884328428896], [-0.10086778941039487, 0.83726452944126994], [0.90131199563415731, 0.58794520243264348], [-0.58621950260778233, -0.38615664052148596]], [[0.49264388446993407, 0.71004287152501988], [0.23897550804139495, 1.1557079309023406], [0.35145460291590636, 0.35283118170345806], [-0.23695608516674493, -1.1360375689559956], [0.29134725004313267, 1.2579369625094898]], [[-0.90155778137500275, -0.50145590516252958], [0.024077265957579974, 1.3237110515487409], [0.51881656775383056, -0.37049814227234812], [0.98472658332749097, 0.30214857513938875], [0.86590686327981881, -0.20844755785466418]]])
62508          self.failUnless(isinstance(res,Data),"wrong type of result.")
62509          self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
62510          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62511       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62512       def test_generalTensorProduct_array_rank2_expandedData_rank2_offset0(self):
62513          arg0=numarray.array([[0.82675552003928821, 0.51314177229085955, 0.56817717065630924, 0.66715525414617849, 0.48733621335937949], [0.35425433224996383, 0.93633205595660529, 0.95386773962906268, 0.67866828989655681, 0.50730364664063798], [0.53774489624499866, -0.2227913813696758, 0.00056705668209855453, 0.92385286856471027, 0.2710614879354003], [0.81871265892537015, 0.27568173577383082, -0.43100539269342475, 0.93458919638348381, 0.12519236747438511]])
62514          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62515          arg1=msk_arg1*numarray.array([[0.24304194664474954, -0.64259418943821278, 0.40401422534538933, -0.9956275670836412, 0.45834943098641756], [-0.92602760954525798, -0.28895125704256253, 0.059912995354097109, -0.58361938142788805, -0.69729460384040798], [-0.079472943301736265, 0.1911962282112214, -0.46834319213965814, 0.89817911734468958, 0.013519637363891501], [-0.22351028443337673, -0.96177683933417235, -0.59800851279437484, 0.031863259989935999, -0.74654863101503621]])+(1.-msk_arg1)*numarray.array([[-0.85483231298140239, -0.34492406320351332, 0.69714693024248819, 0.15429605348879138, -0.90435090030198895], [0.34765672287054294, 0.58045841210554006, -0.20053010244772373, -0.64184495382302043, -0.85651380569663327], [0.36169339892939667, 0.29332958708077483, -0.85302503873353563, 0.61069970788458972, 0.1200139875750319], [0.59002250526351774, 0.12454260195137534, 0.068707242917282807, 0.30075232178090494, 0.82602780279421495]])
62516          res=generalTensorProduct(arg0,arg1,offset=0)
62517          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62518          ref=msk_ref*numarray.array([[[[0.20093627098964084, -0.53126829326321445, 0.33402099097869753, -0.82314058698968706, 0.37894292217488751], [-0.76559843790032867, -0.23889204678222983, 0.049533399631088014, -0.48251054519742126, -0.576492162818666], [-0.065704694568479827, 0.15807253708431876, -0.38720531937428332, 0.74257454324873773, 0.01117743481952671], [-0.18478836144084559, -0.79515431096546663, -0.49440683898323468, 0.026343126083126583, -0.61721320166945493]], [[0.1247149752423073, -0.32974192123213286, 0.2073165756244518, -0.51089809431493627, 0.23519823934487732], [-0.47518344875232177, -0.14827296014449226, 0.030743860619255426, -0.29947948372920163, -0.35781098882351975], [-0.040780886975023946, 0.098110771399633784, -0.24032645565490274, 0.46089322410889394, 0.0069374906776370092], [-0.11469246347937705, -0.49352787188423847, -0.30686314810032667, 0.016350369702200194, -0.38308528762037064]], [[0.13809088559541546, -0.36510734843518811, 0.22955165946164385, -0.56569285409300796, 0.26042368286979201], [-0.52614774714105017, -0.16417550768402714, 0.034041196185835496, -0.33159920887988276, -0.39618687512395501], [-0.045154712068909794, 0.10863333198520979, -0.26610190980605519, 0.51032486963548684, 0.0076815493057151964], [-0.1269934410219429, -0.54645964337565778, -0.33977478482789519, 0.018103976908968217, -0.42417188892746427]], [[0.16214671168195982, -0.42871008976750841, 0.26954021318897464, -0.66423816255262802, 0.3057902311174997], [-0.61780418519254476, -0.19277534932808854, 0.039971269642121471, -0.38936473674115812, -0.46520375863990621], [-0.053020791686214694, 0.12755756822404815, -0.31245762137956612, 0.59922491730088667, 0.0090196971014712048], [-0.14911606061543409, -0.64165447167789802, -0.39896452133490939, 0.021257741316511512, -0.4980638416573181]], [[0.11844314196534458, -0.31315941900755839, 0.19689076272314507, -0.48520536845875328, 0.22337027609234697], [-0.45128678870202399, -0.14081641145255516, 0.029197772286883781, -0.28441885938821032, -0.33981691183151308], [-0.038730043253192813, 0.093176845865052399, -0.22824059780998529, 0.43771520996523078, 0.0065886088789108678], [-0.10892465566263967, -0.46870868297786789, -0.29143120418188467, 0.01552812046878083, -0.36382018292749635]]], [[[0.086098662517367086, -0.22764177548714082, 0.14312378961921732, -0.35270537894687137, 0.16237227161124423], [-0.32804929246448561, -0.10236223461640065, 0.021224438162260856, -0.20674969425587342, -0.2470196342649868], [-0.028153634461295818, 0.067732092153677939, -0.16591260479525111, 0.31818384345580492, 0.0047893901066070454], [-0.079179486562945364, -0.340713611991808, -0.2118471063797652, 0.011287697891041767, -0.26446808677235628]], [[0.22756796558557391, -0.6016815385424501, 0.37829147025336363, -0.93223800685449876, 0.42916726506205255], [-0.86706933551809195, -0.27055432457790807, 0.056098458118420284, -0.54646153530849662, -0.65289929002133584], [-0.074413064394637435, 0.17902315745216124, -0.43852474398940555, 0.84099389956064219, 0.012658869848720269], [-0.20927984415094927, -0.9005424853452112, -0.55993454026430889, 0.029834591735856616, -0.69901741454989796]], [[0.23182987228107449, -0.61294986697819775, 0.38537613590819331, -0.94969701692645581, 0.43720473569528118], [-0.88330786275103945, -0.27562128241816541, 0.057149073452819145, -0.5566957001663313, -0.66512682762079267], [-0.075806676788895827, 0.18237591402944017, -0.4467374620569155, 0.85674408444360572, 0.012895945932899807], [-0.21319924979631394, -0.9174078997632712, -0.57042102837810771, 0.030393335783813404, -0.71210865518948374]], [[0.16494486230252237, -0.43610829964349596, 0.27419164340903751, -0.67570085832652416, 0.31106722450261187], [-0.62846557416707671, -0.19610205548053633, 0.040661050099545439, -0.39608396754415109, -0.47323173634246674], [-0.053935766523635367, 0.12975881723478144, -0.31784967329411634, 0.60956568558911928, 0.0091753491697738384], [-0.1516893425106928, -0.65272744281303818, -0.40584941472174157, 0.021624584167899245, -0.50665888273559023]], [[0.12329606581952081, -0.32599037561209027, 0.20495788981240848, -0.50508549547747761, 0.23252233777507106], [-0.46977718321222223, -0.1465860263990883, 0.030394081024297064, -0.29607224044852104, -0.35374009531107797], [-0.040316913946235475, 0.096994543795488233, -0.23759220925176555, 0.45564954156543053, 0.0068585613359611807], [-0.11338758235473824, -0.4879128978487326, -0.30337189926273095, 0.016164347986753272, -0.37872684290850395]]], [[[0.13069456638166335, -0.34555174572709074, 0.21725658768985989, -0.53539364276005308, 0.2464750672097453], [-0.49796662081491888, -0.15538206373821473, 0.032217907470416036, -0.31383834371250996, -0.37496661439435763], [-0.04273616965007683, 0.10281479590187834, -0.25184916126419193, 0.48299123626594459, 0.0072701159915158423], [-0.1201915147123163, -0.5171905866785973, -0.32157602566623705, 0.017134305437315551, -0.40145271612702643]], [[-0.054147651023758792, 0.14316444712506657, -0.090010887357698771, 0.22181724100029399, -0.10211630287946885], [0.20631097031704682, 0.064375849705016766, -0.013348098996934264, 0.1300253681824349, 0.15535122801122533], [0.017705886819707747, -0.04259687179584979, 0.10434282673187792, -0.20010656627061954, -0.0030120586839184698], [0.049796165019241147, 0.21427559060462101, 0.13323114263628422, -0.0070988597080989639, 0.16632460076348032]], [[0.00013781855987514559, -0.00036438732899864298, 0.0002290989661449742, -0.00056457726479630557, 0.00025991010757691832], [-0.00052511014380038975, -0.0001638517411067621, 3.397406436008042e-05, -0.00033094527004090893, -0.00039540556449896774], [-4.5065663545289112e-05, 0.00010841909879921326, -0.00026557713661816038, 0.00050931847021168798, 7.6664007067439624e-06], [-0.0001267430003056948, -0.00054538198343207032, -0.00033910472313186917, 1.806827449073673e-05, -0.00042333538972860448]], [[0.22453499958930312, -0.59366248523550769, 0.37324970102628718, -0.91981338387232547, 0.42344743662180456], [-0.85551326344850809, -0.26694844769415033, 0.055350792622186777, -0.53917843968211621, -0.64419761999265412], [-0.073421306642589626, 0.17663718389168986, -0.43268020153097642, 0.82978535404381104, 0.012490155760585802], [-0.20649061742748939, -0.88854029193797557, -0.5524718799711994, 0.029436964143525535, -0.68970109428629867]], [[0.065879311688241987, -0.17418253712776446, 0.10951269706918935, -0.26987628976319439, 0.12424087875752242], [-0.25101042171259952, -0.078323557674761318, 0.016240105667348289, -0.15819673791778127, -0.18900971284630649], [-0.021542054261974336, 0.051825934106570035, -0.1269498025257908, 0.24346176797995606, 0.0036646530202034634], [-0.060585030267375634, -0.26070066113172718, -0.16209707727607911, 0.00863690266334456, -0.20236058273907184]]], [[[0.19898151836792083, -0.52609999744495217, 0.3307715606761974, -0.81513289274644518, 0.37525648135982037], [-0.75815052644910264, -0.23656805195314445, 0.049051527730536192, -0.47781657556920604, -0.57088391916449299], [-0.065065504723189685, 0.15653477237531094, -0.38343850012625502, 0.73535061335251284, 0.011068698253898394], [-0.18299069926561562, -0.78741887342411876, -0.48959713956988887, 0.026086854308390865, -0.61120881471541533]], [[0.067002225716875335, -0.17715148154250437, 0.11137934292053657, -0.27447633587789438, 0.12635856672528326], [-0.25528889877392796, -0.079658584095523996, 0.016516918554626954, -0.16089320410328961, -0.19223138673244938], [-0.021909238956477894, 0.052709308066678992, -0.12911366414691772, 0.24761157810539131, 0.0037271170955103473], [-0.061617703175895933, -0.26514430849471343, -0.16486002481468037, 0.0087841188214384108, -0.20580982243780233]], [[-0.10475238965459466, 0.2769615609613299, -0.17413230984871933, 0.42912085052728388, -0.19755107649310868], [0.3991228934970073, 0.12453955001088837, -0.025822824090031959, 0.25154310067582053, 0.30053773455124111], [0.03425326713626712, -0.08240660542167913, 0.20185844144344545, -0.38712004318018156, -0.0058270366110967546], [0.096334137913226592, 0.41453100432066586, 0.25774489389095045, -0.013733236884455054, 0.32176648587537432]], [[0.22714437760219403, -0.60056158710775542, 0.37758733019304314, -0.93050276781794339, 0.42836842636842304], [-0.86545539943382122, -0.270050723113406, 0.055994038180913017, -0.54544436868251578, -0.65168400344574662], [-0.074274554214599872, 0.17868992927547858, -0.43770848757347863, 0.83942849948760023, 0.01263530701931548], [-0.20889029711203344, -0.89886624337357113, -0.55889229540297702, 0.029779058548152298, -0.69771628512153272]], [[0.030426996696039384, -0.08044788790105338, 0.05057949736431902, -0.12464497224596323, 0.057381850395726908], [-0.11593158878561635, -0.036174491953857996, 0.0075006497308612533, -0.073064692064893494, -0.087295962281894152], [-0.0099494059221019397, 0.023936308461935629, -0.058632993014474638, 0.11244517011643525, 0.001692555408980732], [-0.027981781663087638, -0.12040711949827636, -0.074866101486563905, 0.0039890369535919403, -0.093462190551533555]]]])+(1.-msk_ref)*numarray.array([[[[-0.70673733346532686, -0.28516787324788495, 0.57637007285642172, 0.12756511394213554, -0.74767709887716938], [0.28742711471199045, 0.47989719636149525, -0.16578936913269957, -0.53064885858254418, -0.70812751684954989], [0.29903201412665109, 0.24251185530987568, -0.7052431595046782, 0.50489935457996538, 0.099222226709584166], [0.48780436317402326, 0.10296628364335539, 0.056804092348543847, 0.24864864219699542, 0.68292304566604178]], [[-0.43865016809477159, -0.17699494509801528, 0.35773521133176261, 0.079175750344723669, -0.46406022375379702], [0.1783971869226226, 0.29785745832897498, -0.10290037216769259, -0.32935745714068959, -0.43951301224675932], [0.1855999917525355, 0.15051966417997481, -0.43772278018420557, 0.31337553044140859, 0.061584190283945066], [0.30276519404241448, 0.063908011491043804, 0.03525655639979311, 0.15432857941924444, 0.42386937068734809]], [[-0.48569620497536181, -0.19597797832225017, 0.39610297035690833, 0.087667495114696042, -0.51383153581407004], [0.19753061316022968, 0.32980321827377973, -0.11393662624016751, -0.36468164986319318, -0.48665159074878089], [0.20550593204876835, 0.16666317485733811, -0.48466935300660885, 0.34698563214650074, 0.068189207899563078], [0.33523731766417281, 0.070762263202907377, 0.039037886884337486, 0.17088060325779045, 0.46933013987506483]], [[-0.57030586901947311, -0.23011790104767246, 0.4651052374231554, 0.10293942277906697, -0.60334245472829873], [0.23194100930232461, 0.3872558794495588, -0.13378471146247034, -0.42821023329023938, -0.57142768571924796], [0.24130565148573677, 0.19569637521746794, -0.56910013650932567, 0.40743151882074041, 0.08006796238171672], [0.39363661445104708, 0.08308925125689616, 0.045838398110163034, 0.20064849167279289, 0.5510887887049839]], [[-0.41659074246559658, -0.16809398685813146, 0.33974494513948966, 0.075194054443523867, -0.44072294330131701], [0.16942571087266159, 0.28287840456811209, -0.097725580791442127, -0.31279428935993658, -0.4174101947582286], [0.17626629143133563, 0.14295013023421516, -0.41570999227713928, 0.29761608314015514, 0.058487162254975668], [0.28753933351193728, 0.060694120036907724, 0.033483527593671653, 0.14656749765574784, 0.40255326154330096]]], [[[-0.3028280502209188, -0.12219084368710494, 0.24696732025316478, 0.054660045397476494, -0.32037022430613471], [0.12315890021271492, 0.20562990717932242, -0.071038657538635211, -0.22737635552458296, -0.30342372629993608], [0.12813145351695321, 0.10391327700045751, -0.30218781548904822, 0.2163430172219033, 0.042515475029048379], [0.20901802861457824, 0.044119756290957511, 0.024339838460398076, 0.10654281292512073, 0.29262392769876944]], [[-0.80040689711201674, -0.32296345724825171, 0.65276101849778501, 0.14447234098915038, -0.84677273778596829], [0.32552213409251124, 0.54350181840408673, -0.18776276310606585, -0.60098000521848105, -0.80198133264314497], [0.33866512384549458, 0.274653895344244, -0.79871468829983427, 0.57181771305567619, 0.1123729437296801], [0.55245698541405652, 0.1166132305393164, 0.064332794019849315, 0.28160403978683723, 0.77343631086762454]], [[-0.81539696614545376, -0.32901193651160721, 0.66498596653974207, 0.14717802777503838, -0.862631149102566], [0.33161853241137224, 0.55368055350378642, -0.1912791955493946, -0.61223519529548465, -0.81700088780093372], [0.34500766487553647, 0.27979763019506498, -0.81367306554375129, 0.58252674995200249, 0.1144774710520661], [0.56280343342598838, 0.11879717021088049, 0.065537622497653478, 0.28687793736534434, 0.78792127312207894]], [[-0.58014758399940658, -0.23408902411850027, 0.47313151495430367, 0.10471583875902571, -0.61375427897436241], [0.23594359358159256, 0.39393871789973772, -0.13609342170097802, -0.43559981718980373, -0.58128875978492589], [0.24546984051828674, 0.1990734892401726, -0.57892104427623281, 0.4144625263903613, 0.081449687711213511], [0.40042956464767376, 0.084523114685607484, 0.046629427054179641, 0.20411106390546574, 0.56059887632936012]], [[-0.4336595496417166, -0.17498123507724819, 0.35366517995634073, 0.078274950597122805, -0.45878050956594302], [0.17636752329136013, 0.2944686691843747, -0.10172965223295098, -0.32561028565231015, -0.43451257702795293], [0.18348838024272995, 0.14880716919366965, -0.43274271282529408, 0.30981018881222472, 0.060883533544697901], [0.29932056852022759, 0.063180916132046142, 0.034855434882561716, 0.15257274957509165, 0.41904691658405901]]], [[[-0.45968171345105646, -0.18548115457977662, 0.37488720367076611, 0.082971915274342889, -0.48631008105196416], [0.18695062836889637, 0.31213854859223034, -0.10783403913475015, -0.34514884809893609, -0.46058592757674499], [0.19449877927978931, 0.15773648837033957, -0.45870986094815108, 0.32840065105324967, 0.064536909296484091], [0.31728159087514451, 0.066972148564424502, 0.036946969213834162, 0.16172802607151518, 0.44419223510905931]], [[0.1904492718485617, 0.076846108508752092, -0.15531832760635295, -0.034375830896657217, 0.20148158632119006], [-0.07745492153078283, -0.12932113146064181, 0.044676378530530976, 0.14299752388738649, 0.19082389393335103], [-0.080582171979773506, -0.065351303902322438, 0.19004662672236561, -0.13605863152166522, -0.026738082075524465], [-0.13145192898685593, -0.027747018328120595, -0.015307381559643311, -0.067005025219705042, -0.1840318752342813]], [[-0.00048473837514986714, -0.00019559149485613638, 0.00039532182519849782, 8.7494608152255144e-05, -0.00051281822097808648], [0.00019714106778022673, 0.00032915282126476299, -0.00011371193455488945, -0.0003639624699365819, -0.00048569187682993885], [0.00020510065873385254, 0.00016633450241136321, -0.0004837135482112297, 0.00034630135011159193, 6.8054733599714744e-05], [0.00033457620419820728, 7.0622714642467859e-05, 3.8960901204813798e-05, 0.00017054361372251679, 0.00046840458517364664]], [[-0.78973928448967479, -0.3186590852275612, 0.64406119131560469, 0.1425468516238339, -0.83548717343307077], [0.32118366069975762, 0.53625816910621993, -0.18526031037990481, -0.59297030176318144, -0.79129273635811148], [0.3341514841418432, 0.2709933804594758, -0.78806962899150002, 0.56419667696080877, 0.11087526668908272], [0.54509398400543774, 0.11505904007129099, 0.063475383460304097, 0.27785089520478584, 0.76312815512564025]], [[-0.23171211869199873, -0.093495629796668381, 0.18896968422112556, 0.041823717841231907, -0.24513470065157597], [0.094236348592034488, 0.15733992086994747, -0.054355987945318256, -0.17397944820709621, -0.23216790660934175], [0.09804115089021459, 0.079510354329591401, -0.23122223624526464, 0.16553717150091121, 0.032531170045148793], [0.15993237819210168, 0.03375870299628609, 0.018623887497097671, 0.081522371841958388, 0.22390432530140933]]], [[[-0.69986203589632812, -0.28239369691269084, 0.57076301692048703, 0.12632413221349953, -0.7404035301877937], [0.28463095997462273, 0.47522864997052494, -0.16417653336955276, -0.5254865887622765, -0.7012386952681785], [0.29612296435324098, 0.24015264618038207, -0.69838239759144982, 0.4999875816471393, 0.098256970875790703], [0.48305889411010283, 0.10196460479309449, 0.056251489536239915, 0.24622973304322321, 0.67627941877193298]], [[-0.23566165583827162, -0.095089264454107078, 0.19219067581864691, 0.04253660384884185, -0.24931302594387894], [0.095842608814392952, 0.16002178259377689, -0.055282486717692599, -0.17694493096760455, -0.23612521266869752], [0.099712264034792719, 0.08086560972024906, -0.23516342333660037, 0.16835875550619511, 0.033085664411823756], [0.1626584283966708, 0.034334120683744446, 0.018941331987670767, 0.082911922106569585, 0.22772077847175279]], [[0.36843733674357793, 0.14866413131044193, -0.30047408643417922, -0.066502431124982206, 0.38978011491731096], [-0.1498419223633275, -0.25018070585175006, 0.086429555552333864, 0.27663863637078401, 0.36916206917161715], [-0.15589180544018413, -0.12642663386834949, 0.36765839179667137, -0.26321486741455735, -0.051726675843480424], [-0.25430288157906072, -0.05367853306111342, -0.029613192214446003, -0.12962587255263819, -0.35602243751900742]], [[-0.79891704443192357, -0.32236230304269747, 0.65154598929653973, 0.14420342463523259, -0.84519658116191598], [0.32491621724489628, 0.5424901609037498, -0.18741326729731581, -0.59986135959625098, -0.8004885493573759], [0.33803474304263564, 0.27414266306532048, -0.7972279854449652, 0.57075334922348697, 0.11216377620252647], [0.5514286590424009, 0.11639617027324399, 0.064213046943788155, 0.2810798707236829, 0.77199666040386017]], [[-0.10701848105574631, -0.043181860071332276, 0.087277474674557112, 0.019316688228216153, -0.11321783023639762], [0.043523968204549478, 0.072668962831914846, -0.025104838275311524, -0.080354089320591321, -0.107228991109657], [0.045281252911828399, 0.036722625456926013, -0.10679222411398039, 0.076454942245987201, 0.015024835234559683], [0.073866314297107633, 0.015591783189712655, 0.008601622403452313, 0.037651895187169569, 0.10341237623147227]]]])
62519          self.failUnless(isinstance(res,Data),"wrong type of result.")
62520          self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
62521          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62522       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62523       def test_generalTensorProduct_array_rank3_expandedData_rank3_offset1(self):
62524          arg0=numarray.array([[[-0.45979513491413471, -0.72148453618917063, 0.46162394048506172], [-0.27931727036396925, -0.087963835320678196, -0.81369318042654837], [-0.09903215955421496, 0.49331423794044671, -0.26419541322629514], [0.56347412948493036, -0.32210402523721471, -0.096728019778726804], [0.26291391225995797, 0.064011888645508108, 0.15745739885034227]], [[0.88013443362043953, 0.62020142228273989, 0.49050781595683457], [-0.42956419101548127, 0.16057044848068158, 0.44921879739612058], [-0.24286765078726935, -0.84016331011763001, -0.60491141666917603], [-0.80459610324454789, -0.94370793923257645, 0.69840485456400025], [0.44975924812729695, 0.17685527966449599, -0.86718423756195939]], [[0.19614137337281856, -0.22075974230580875, 0.35422968684121936], [0.11405744635454562, -0.10434014838606132, -0.54572827970602611], [-0.90787542821803102, -0.57971333760228694, -0.30580062126288166], [-0.26638761438835123, 0.35857790892927399, -0.61619039701919243], [-0.50529668668560745, 0.29827280408213808, 0.46186016255409434]], [[-0.8809181804267141, -0.044473201849275279, 0.22646787491484366], [0.93777773949542831, -0.48464485018807046, -0.9053052940825328], [0.36283345333018868, -0.57777103958186027, 0.66070535403250585], [0.24174164955549204, 0.17836079986498965, 0.53473830346891749], [0.55108136140904351, 0.72096343453413203, 0.084183137314589818]]])
62525          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62526          arg1=msk_arg1*numarray.array([[[0.83835739603278192, 0.224217403041991, -0.7928184391581492, -0.62554593250550283, 0.76265152692725935], [-0.58522021321470774, -0.11182681701469455, 0.054290460142057517, -0.45398551663434716, 0.41672592109312601], [-0.63576157766940078, -0.76117231600159441, -0.83146148406710418, -0.50965675880498229, -0.21763202809881332], [0.060353200680485886, -0.44657978361184902, -0.55019718330516754, -0.8835960141268997, 0.47696254810455674]], [[0.19413120262338079, 0.7336439358629947, 0.61868692935645342, 0.076772707132149787, 0.090835623243088692], [0.50612599464639696, 0.96737663970527432, -0.14563569391073705, 0.13201956284635741, -0.47089865190472868], [-0.49005261890621421, 0.587229407467035, -0.48200397831924802, 0.42280047433335621, -0.34670078613393707], [0.60152751344028621, -0.20533206090396194, 0.93125466890491992, 0.076121364367310873, -0.88426762092006017]], [[0.16450125716874275, 0.9922165072790059, -0.95331053821144907, 0.69453214079977044, 0.9154630021737038], [-0.038159887318635732, -0.71254095128562511, -0.495540136424373, 0.32027756279131991, -0.045593379636342579], [-0.63117418925222024, 0.60513965241665235, 0.31222894913517263, -0.43556682596107033, 0.73897595671581939], [-0.73336137640475529, -0.24906170053898702, -0.53930598750625669, 0.8463789281866716, -0.90291696518077003]]])+(1.-msk_arg1)*numarray.array([[[-0.22702578552188357, -0.39848495723760791, 0.63650967591951435, 0.025525368169221352, -0.35516137887933774], [0.66129351284746463, 0.5249507638698756, -0.32572469594496134, 0.41881160846889132, 0.48088720208241686], [0.71514829872137864, 0.19197956003336181, 0.80731679119788091, 0.0034997381830392804, 0.0080925366466835236], [-0.83933575358694612, -0.1965811748691586, 0.51414045790618013, 0.11755792072497884, 0.029969597362226041]], [[-0.093812729511846271, -0.10827024465170254, -0.82486353354957087, -0.93135643885400521, -0.91394914684575723], [0.10162053217062872, 0.96238672759410737, 0.78967706105915525, -0.45890296392914443, -0.26249749950196732], [-0.30167261897835584, 0.35607941445268798, -0.63008988548979561, -0.78522295201770897, -0.83991966439660848], [-0.74831901935637668, 0.80525624922599892, 0.31959695775590014, 0.58120579924666793, -0.30343072352242428]], [[0.56176910659589407, 0.20834039330571086, -0.10638097703618055, 0.096673635852856821, 0.39393445183826903], [0.43344082081638491, 0.59447117436394503, 0.38033335633047072, 0.77182875585276856, -0.40697455011606154], [0.79626795395427363, -0.74841053553638215, 0.83372776563201922, -0.16296585628576588, -0.32766534425674099], [-0.67813774361717272, 0.97075596742919212, -0.22228956989552739, 0.94388662910247256, 0.08197610221322571]]])
62527          res=generalTensorProduct(arg0,arg1,offset=1)
62528          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62529          ref=msk_ref*numarray.array([[[[-0.44959759415074985, -0.17437593197143986, -0.52190995823301223, 0.55284531906364553, 0.0063996792107256506], [-0.11369618916369771, -0.97545582149115317, -0.14864177881651577, 0.26133804938653249, 0.12709054878259815], [0.35452035046248964, 0.20565334193819795, 0.87419271981482682, -0.27177438049504576, 0.69133439666447005], [-0.80028007546438562, 0.23850627495507909, -0.66786440982151496, 0.74206153723348778, 0.001872267794326532]], [[-0.38509777571728987, -0.93452173282362927, 0.94272809092232834, -0.39716350596839878, -0.96591799434599868], [0.14999176894938157, 0.52593071468968833, 0.40086404069844711, -0.14541462048117532, -0.037877673218075246], [0.73426822980062811, -0.33144438568882562, 0.020581904072146884, 0.45958253929875176, -0.51001418158947587], [0.52696079236385585, 0.34545904898361823, 0.51059244726262509, -0.4485850623114086, 0.67925707144263969]], [[-0.030717134738700122, 0.077573215356468772, 0.63558186481918288, -0.083669971827642048, -0.27257764759358255], [0.31771644807908439, 0.67654517206819986, 0.053698768243288508, 0.025470433108653656, -0.26152471574622971], [-0.012035766500981537, 0.2051940453575076, -0.23792745513348443, 0.37412066082492879, -0.34471392262306055], [0.4845158909770681, 0.0087334901274975021, 0.65637057078730121, -0.098553256371975956, -0.24490991798990078]], [[0.39395038128064891, -0.20594409677874884, -0.55380238955621952, -0.44438846641924218, 0.31192496197320985], [-0.48909054001562524, -0.3056847527108365, 0.12543372911195522, -0.32931294081553558, 0.39090278420628921], [-0.13933505094769055, -0.67658382429767305, -0.34345290230541692, -0.38123261660220659, -0.082435979771582235], [-0.08881037243314939, -0.16140662639297765, -0.55781675605687331, -0.60427105045170648, 0.6409195867419698]], [[0.25874446784939753, 0.26214363889097592, -0.31894547636590043, -0.050191138125076459, 0.35047267950155497], [-0.12747301157759791, -0.079672064981614915, -0.073075159454409275, -0.060478214784496359, 0.072240915223348245], [-0.29790280338261776, -0.067249412453078333, -0.20029401847981659, -0.17551481492618273, 0.036945771901572222], [-0.06110056643013366, -0.1697723385836456, -0.16996084178776993, -0.094168388157969907, -0.073374507674724948]]], [[[0.93895681228129213, 1.1390384214472888, -0.78168256440441741, -0.1622765293579248, 1.1766140102166998], [-0.21989012215282083, 0.15203882977658684, -0.28560687114692107, -0.160590917083649, 0.052358909806403633], [-1.173082860377143, -0.0089077222585456362, -0.87758669533735623, -0.39999393973370273, -0.044096279881939593], [0.066467662428570995, -0.64256419189831027, -0.17121581820971937, -0.31531721945941704, -0.57152070262022314]], [[-0.25505952542384447, 0.46720807461378261, 0.011664235634632758, 0.59303645349806244, 0.098220919468048618], [0.31551638671353738, -0.11671789216005216, -0.26931197042288985, 0.36008906319031903, -0.27510434406430317], [-0.089122871249974978, 0.69310416637994687, 0.42002959783837945, 0.091154749329308976, 0.36977891595172213], [-0.25877774678423981, 0.046981224770724361, 0.14361060064518452, 0.77199337286978009, -0.75248055283635629]], [[-0.46622049360559475, -1.2710389646054958, 0.24942032151968141, -0.33270716187715987, -0.81531416416777081], [-0.26001408112416174, -0.35457108712488666, 0.40893025609336564, -0.19439915124029775, 0.32200248050271352], [0.94793462424701302, -0.67456035497035638, 0.41802629932355462, 0.032037039429810898, -0.10287393336232514], [-0.076420517754122896, 0.43163251300831706, -0.32254855888997774, -0.36134176574985344, 1.1732752183925084]], [[-0.74285377455414392, -0.17978123014874703, -0.61175784819993362, 0.9159254252427047, -0.059984940626970573], [-0.033420266860242423, -1.3205876533632661, -0.25233196900453408, 0.4643704726827213, 0.077252106469884674], [0.5331827172396687, 0.4808956963119897, 1.3419238649713026, -0.29313430795119677, 1.01839456173869], [-1.1284093856171018, 0.37914394899354908, -0.81279983455931504, 1.2302167261565178, -0.17987342508039766]], [[0.26873922295736546, -0.62984186130070263, 0.57953649705755417, -0.87005473466403127, -0.43480074867009133], [-0.14060549596582217, 0.73869480258727682, 0.42838579054477965, -0.45857548201116272, 0.14368328432756941], [0.17473626594768349, -0.76325723555483549, -0.72996246350643401, 0.22326834136571677, -0.80002618341898646], [0.76948715283044877, -0.021185065873587178, 0.38491868501117132, -1.1179094793064344, 0.84112627965635367]]], [[[0.17985144558234614, 0.23349180579353959, -0.6297765579975525, 0.10638014138464186, 0.45381884169177156], [-0.24003550543265278, -0.48789484119862014, -0.13273592367129339, -0.0047381266274785783, 0.16954213093928475], [-0.24009589451679808, -0.064575566529982115, 0.053923839527523318, -0.34759280073996779, 0.29561815305357131], [-0.38073366989331775, -0.13048876741195187, -0.50453816295379916, 0.10969827418127895, -0.031077212463298476]], [[-0.014407762848319086, -0.59245546032455509, 0.36526778743701582, -0.45838447769242097, -0.42208576609897541], [-0.09873305479760533, 0.2751628442504887, 0.2918181473343322, -0.24033989285706039, 0.12154592623908846], [0.3230684254298033, -0.47833079560592867, -0.21493417428031047, 0.13545592197247863, -0.39192781950177119], [0.34433630428649231, 0.10640864136660091, 0.13439319273894607, -0.57061613589254634, 0.63941306714883883]], [[-0.92396911396928783, -0.93228506982470383, 0.65264227004322894, 0.31102325891153049, -1.0250003587215568], [0.24956837931977055, -0.24138085556016547, 0.1866744610206604, 0.23768771623458804, -0.091406511075599425], [1.0542958130764657, 0.16557284093691324, 0.93880777928146097, 0.35079838000906383, 0.17259053392118012], [-0.17924434587342158, 0.60063576938112695, 0.12456985715915492, 0.49924333743369481, 0.35571172515388938]], [[-0.25508096100434974, -0.40805451422955946, 1.020465277084039, -0.23379735014523687, -0.7346887837947883], [0.36089477342224002, 0.81573006328685449, 0.2386630246530147, -0.029076541046432147, -0.25177027519183315], [0.38256044090601393, 0.0404531277147539, -0.14373741757336034, 0.55576525353306006, -0.52169465429265938], [0.65150737046825513, 0.19880521029273918, 0.8128082375167115, -0.25885609384202934, 0.11223301346456183]], [[-0.28973857893111643, 0.5637950004340796, 0.1448498555751136, 0.65976222514679739, 0.064544397399407261], [0.42904892260084754, 0.015953583461343457, -0.29974220438666122, 0.41669866977569858, -0.37208425425671826], [-0.11643536371856836, 0.83926230951018388, 0.42057216801544239, 0.18246678957620072, 0.34786088254968406], [-0.18978737868552556, 0.049378637929118063, 0.30669680410067235, 0.86009178046198387, -0.92178195439246458]]], [[[-0.70990365788816323, -0.0054395176939806555, 0.45499897641849374, 0.7049296745222573, -0.46855038574256941], [0.48438009326491827, -0.10587969542184714, -0.15357248938215834, 0.46658534161534732, -0.35648450514572055], [0.43890746388207802, 0.78145925074270695, 0.8245956244567717, 0.3315207203128579, 0.37448921876901425], [-0.24600087870851414, 0.34612755054167382, 0.32112734381040975, 0.96666806943355454, -0.58532045394304777]], [[0.54318435713056246, -1.0435495229232177, -0.18029384074780497, -1.2525941716586706, -0.15759889447834796], [-0.75955149749605855, 0.071364289149069671, 0.57010908298095564, -0.77966908598142237, 0.6602908268378892], [0.2127037579275014, -1.5462442930664246, -0.82878784576127473, -0.28853188226415544, -0.70506256661087852], [0.42898661300506796, -0.093802578033125528, -0.47905388471521543, -1.6317398244722949, 1.6932561175475198]], [[0.30070758372895789, 0.31303811385463426, -1.2749778191455023, 0.18755506625518586, 0.82908460168517106], [-0.52997485486627327, -1.0702763384639151, -0.22356353986632174, -0.029389112320505506, 0.3931499186569461], [-0.36455752381124912, -0.21564391693041296, 0.18309723643854475, -0.71698372535299337, 0.60959486442154309], [-0.81018280438632462, -0.20795556581791702, -1.094004275606985, 0.19462817641388375, 0.087400117903787655]], [[0.32525641958958779, 0.71563217586327288, -0.59107940157630101, 0.23386567453118665, 0.69009928524421094], [-0.071604615863477702, -0.23551406742373754, -0.2778357253172693, 0.085064587727803315, -0.0076303751076407696], [-0.57860924474795006, 0.24432300664891571, -0.12000870725694229, -0.28070850035699152, 0.28071019440115341], [-0.27027760752184699, -0.277762955374522, -0.25529381585881394, 0.25256634159005475, -0.52524125314109571]], [[0.61581286566733906, 0.73602038192297503, -0.071109483252961181, -0.23090849491820126, 0.56283875226956115], [0.039181964550764239, 0.5758335773431581, -0.11679567273554164, -0.12803970906419565, -0.1136890152028508], [-0.75680059842592962, 0.054845608751737746, -0.77942575776840761, -0.012706040315094383, -0.30768222942132389], [0.40520220460198231, -0.41510549831614452, 0.32279668169958459, -0.36080174057326186, -0.45068983353875247]]]])+(1.-msk_ref)*numarray.array([[[[0.43139585395308566, 0.35751166523993061, 0.25335422579671479, 0.70484969293569322, 1.0045512243810191], [-0.17729052280562566, -0.66129482307500931, -0.24440217497343206, 0.49481848372313253, -0.21959090478268323], [0.25640677167671072, -0.69066127940404498, 0.46826847232567553, 0.4896881140083959, 0.45100997314790048], [0.61277847926042939, -0.042468668731655224, -0.56959773122567559, -0.037662891422459877, 0.24298283109290919]], [[-0.38544334080742187, -0.048697560732858289, -0.018668509669452923, -0.0038666699703643059, -0.14094459786397545], [-0.54633747069178895, -0.71500018260061227, -0.28795714832888869, -0.70464624562154488, 0.21992260221625554], [-0.82113479405251544, 0.52403123127714091, -0.84847099673897897, 0.20069789102712809, 0.33824122587893796], [0.85206203996792718, -0.80582242148397742, 0.0091542236568759872, -0.85199516193540681, -0.048383491262814868]], [[-0.17221312260839441, -0.06899100366800219, -0.441846487053843, -0.4875199553896401, -0.51976740383934805], [-0.12987154605435042, 0.26571550975921543, 0.32133382941554589, -0.47177280106482633, -0.069596242611793285], [-0.43001241969651316, 0.35437352526558374, -0.61104968853047426, -0.34465341707490976, -0.32857806952755542], [-0.10687431310206727, 0.16024295725185628, 0.16547317457723934, 0.02570456316533784, -0.17431236028883881]], [[-0.15204451232720545, -0.20981403646095192, 0.63463862122602854, 0.30502549313355065, 0.056157950821500269], [0.29796353173801449, -0.071694483610664023, -0.47468449191762169, 0.30914653121314106, 0.39488484111118594], [0.42311610755218348, 0.065873171853347914, 0.57721177871218443, 0.27065885004973234, 0.30679585972042234], [-0.1663124937244253, -0.46404398802344798, 0.20826301031838407, -0.21226816491269809, 0.10669396417564363]], [[0.022761334828578131, -0.078893085522973749, 0.097795704498727043, -0.037684931007157751, -0.089852584516366366], [0.24861665100556654, 0.29322493592040638, 0.024797466951671975, 0.20226630131078877, 0.045547820887825649], [0.29409008378697349, -0.044575363168530571, 0.30319817774608226, -0.075003654141041723, -0.10323053635870996], [-0.37535216558576057, 0.15271475714489291, 0.1206315466432428, 0.21673362718454453, 0.0013639942279994911]]], [[[0.017556138119362796, -0.31567710057250109, -0.0035481542926302512, -0.50774365859007975, -0.68619439221031331], [0.85765850033740954, 1.3504936178636806, 0.38963379958042538, 0.46258628422083514, 0.060819864975898197], [0.83290451050615411, 0.022707563400790609, 0.72871464904921091, -0.56385217780915198, -0.67451926268005513], [-1.5354686817662366, 0.80256659947887865, 0.54169243703861603, 0.9269152062585484, -0.12160097283538937]], [[0.33481583832574863, 0.2473802874766009, -0.45365880609732401, -0.11708549077241115, 0.18277414670837319], [-0.07304099417509971, 0.19607844429135018, 0.43757135829694038, 0.09312726099287616, -0.43154188112628444], [0.0020567245603651529, -0.36149179385607266, -0.073442015567399321, -0.20079428974149227, -0.28553597305320177], [-0.064241558221356493, 0.64982641868528246, -0.26939515629104072, 0.46683741913461368, -0.024770667153330983]], [[-0.2058653135562227, 0.061716310108212491, 0.60278353457400069, 0.71781323634589844, 0.61582830289562474], [-0.50817794559280505, -1.2956579777222812, -0.81441769122027885, -0.18305038440268179, 0.34993237467476174], [-0.40190369721700947, 0.10693159304565569, -0.1710241724794922, 0.757445448351178, 0.90191277769579203], [1.2427709502101587, -1.2160249152107976, -0.25891622448180107, -1.0878266021780247, 0.19806443523676368]], [[0.66353815119900128, 0.56830087534189633, 0.19200006967654548, 0.92590819042705408, 1.4233882609463122], [-0.32525711311206196, -0.91540378037342718, -0.21752102844972127, 0.63514513220930913, -0.42343199607203752], [0.2654027157611778, -1.0131945275471868, 0.5273364019873571, 0.62438911302414479, 0.55728456505606294], [0.90790618408992074, 0.076222412009258833, -0.87052971007448132, 0.016139831925271797, 0.31948906928569304]], [[-0.60585553750496213, -0.37903996427661646, 0.23264654881857305, -0.23706888626429484, -0.66298759395991658], [-0.060478046961460474, -0.10921139737733987, -0.33665822849526433, -0.56211274906518127, 0.52278131270649419], [-0.42221885280895344, 0.79832892664466948, -0.47133210667620568, 0.004024636667576853, 0.13924168778984206], [0.078227175254489079, -0.78782465572049265, 0.48052784631137835, -0.66286153059808439, -0.11127260558712349]]], [[[0.17517621933526967, 0.019542676804761856, 0.2692592429224141, 0.24485725995878335, 0.2716446150265433], [0.26081090153945929, 0.10108765572741406, -0.10349162800010342, 0.45685824261071145, 0.0081082891598722451], [0.48892908707374699, -0.3060620948422475, 0.59277783025337283, 0.11630471575578447, 0.07093893763694134], [-0.23964627411052619, 0.12754471865433506, -0.04845149124782698, 0.2291037945940973, 0.10190193533398763]], [[-0.32267883537006181, -0.14785048767247053, 0.21672015929555338, 0.047331690354075175, -0.16012838103817101], [-0.17171856553803885, -0.36496076169353586, -0.32710501702712103, -0.32555819324240198, 0.30433531542208031], [-0.32150138615133139, 0.39317211350059472, -0.29716465552977289, 0.1712645269313863, 0.26737660112047834], [0.35242616905948687, -0.63621108745948862, 0.14660445827602989, -0.56234036943720778, -0.0096584147771998988]], [[0.088706280978789465, 0.36082978437355218, -0.067155733621695163, 0.48718303720483569, 0.73180539914430631], [-0.79182938131409752, -1.216287975902838, -0.27837505353520298, -0.35022231257476449, -0.15995930270293149], [-0.71788116214084285, -0.15185310435152163, -0.6226260357040363, 0.50186195207135331, 0.57976588263170004], [1.403197766308748, -0.58520434748445849, -0.58407381887968679, -0.73230181891496537, 0.12362583343999448]], [[-0.31931904379593035, -0.061049210464478559, -0.39978519864030548, -0.4003328523025283, -0.47585000777886244], [-0.40680359483107742, -0.16105719024444184, 0.1355720121472411, -0.75171215796508162, 0.02854561058952057], [-0.78933245280549635, 0.53770461986410245, -0.95473055054999689, -0.1820778953980467, -0.1014281498925822], [0.3731199453692261, -0.2570566127722006, 0.1146124570972569, -0.40452229063070422, -0.16729997085992385]], [[0.34619236221655558, 0.2652831870340564, -0.61679372476898531, -0.24604647940958055, 0.088798323129940238], [-0.10364973192582194, 0.29636045941985534, 0.57578762673365735, 0.0079745626845332263, -0.50925190699474243], [-0.083578357160301375, -0.33645884177151963, -0.2108075353061139, -0.3112464947110441, -0.40594989461951747], [-0.11229444544826508, 0.78787136470465735, -0.26713308599106889, 0.54989988760402686, -0.067787175104388531]]], [[[0.33138595011107735, 0.40303017403270319, -0.54812049691010811, 0.040828114888311867, 0.44272785869142994], [-0.48890444691320128, -0.37061046735888659, 0.33795062610704546, -0.17373545779380548, -0.50411483627786424], [-0.4362416793738581, -0.35444521992384093, -0.49434536872921203, -0.0050681353071207053, -0.043980620083011845], [0.61908985391585714, 0.35720464816425901, -0.51747062318513692, 0.084353006607709474, 0.0056587263000622383]], [[-0.67600641796716088, -0.50982936695306336, 1.0929777303940305, 0.38779506950581694, -0.2467526324596534], [0.17850019827466823, -0.512306532060683, -1.0324880910172252, -0.083583497129943063, 0.94661958941893176], [0.0959886419864735, 0.68500212333316446, 0.30767537361420372, 0.53137008895717053, 0.71128891148782281], [0.18948026276620655, -1.4534432606411554, 0.52849838113198078, -1.0259407586872702, 0.10094755949003555]], [[0.34299358495813226, 0.055623351991863898, 0.63724278398904532, 0.61124502418007221, 0.65946352057713042], [0.4676026793858406, 0.027200806121645216, -0.32314806792203749, 0.92705109612024938, 0.057255153152093896], [0.95987592997089166, -0.63055461456953732, 1.2078176260098616, 0.34727648960901514, 0.27172725340005999], [-0.32023127020442477, 0.10480369835689463, -0.14497441766652033, 0.33048101694890497, 0.24034950671147307]], [[0.22878535764539559, -0.0042339898629819989, -0.050138403790241211, -0.10825183876054131, -0.038218158002074371], [0.40976471321428004, 0.61644103734700528, 0.26548502066364432, 0.43212030885067676, -0.1481936789762906], [0.54486953459553844, -0.29028371537034786, 0.52860492780421997, -0.22635104682645657, -0.32306765029946372], [-0.69899941498968499, 0.61520469032921754, 0.062425983932445986, 0.63681531162742799, -0.003039484825718794]], [[-0.14545374079258278, -0.28011777223963741, -0.25288331181160079, -0.64926909232879859, -0.82148409404014677], [0.47417962538040659, 1.0331806706034856, 0.4218451323894189, -0.035078019485998285, 0.041496480774240306], [0.24364230509213675, 0.29951304803586182, 0.060811287450954182, -0.57790737293652716, -0.62867561653242499], [-1.0591407028774973, 0.55394937255281318, 0.49503791044264411, 0.56327144590070943, -0.19534576458951644]]]])
62530          self.failUnless(isinstance(res,Data),"wrong type of result.")
62531          self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
62532          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62533       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62534       def test_generalTensorProduct_array_rank4_expandedData_rank4_offset2(self):
62535          arg0=numarray.array([[[[0.69308117496544019, -0.075767826614073774, -0.9977258499604007], [-0.63784675905441546, -0.53227482529552517, -0.033982906423264181]], [[-0.60110913778411357, -0.98188266261391188, -0.2175795030819252], [0.97519644861289945, 0.81765344269340301, 0.091768825065436266]], [[-0.97296643385187909, 0.70736530731283365, -0.90612006625128028], [-0.68403621101075296, -0.37284354669451036, 0.62431995263050299]], [[-0.29790001042364, 0.61303024296465902, -0.71840363815864094], [-0.14887797270220493, -0.10949702427850694, 0.19233665303491665]], [[-0.16187283104495842, 0.7791039805813722, 0.11784613220144946], [-0.30519602732146178, -0.18918790482210257, -0.93553747016497324]]], [[[-0.21538955784489278, -0.61948922787170013, -0.29967679907403122], [0.59152829293768705, -0.90132918507546522, 0.73847525036131079]], [[-0.16590680524176804, 0.21654155092839344, 0.93894887303238161], [0.93432239804159845, 0.018054761216464321, -0.98288246780471522]], [[-0.86677994313865447, -0.69420860338904422, -0.97875001448046306], [-0.93726474593187437, 0.28304741219167218, -0.73468879687916622]], [[-0.71209250974388327, 0.9401007397840011, -0.82424912109214588], [-0.45856281073802174, -0.82692845938817361, 0.17791456113089743]], [[0.12679839727484632, -0.7817050981717435, 0.03512949740344995], [-0.27619629471696827, -0.30992932905320214, -0.72889052855290104]]], [[[-0.29496513742564279, -0.72528316058082987, 0.82900986457677139], [0.53669886467017491, -0.067928261863701822, 0.048679578872849127]], [[0.54406362686770549, -0.24383972173760049, -0.21890545367835879], [0.15936695774687948, 0.31240269931745956, 0.20225848362974053]], [[0.70432065147360934, 0.037792804491051379, 0.63563277205381219], [0.76055918016524604, -0.48929986278996962, -0.14160122292600219]], [[-0.64666175940898984, -0.67537198198226189, -0.40855808019723105], [0.051550341176872294, -0.21108798820282115, 0.89113964954656399]], [[-0.10233659146857899, 0.53333321227498787, 0.56269524951414973], [0.24940794322440518, -0.10457335513943433, -0.15226501380409418]]], [[[0.098574064136093709, -0.059648642212561498, -0.84290117183255409], [0.40665103267275837, 0.29411386144570284, -0.48231890848930004]], [[0.06828022147820656, 0.79816039157704899, -0.74508586738713301], [0.78971876654679218, 0.32684116491536397, 0.25245513164422761]], [[0.64559870025978849, 0.71272469891664247, -0.34995595705026994], [-0.31444236570387396, -0.32172223677691436, 0.14293565454880919]], [[-0.14857517538197973, -0.90054660828307065, -0.30962481930821872], [-0.51011170925789462, -0.85737435983595534, -0.93583733949594294]], [[-0.1195625080375784, -0.36403692940464438, -0.64104631434387582], [-0.97534581565731604, 0.97594482271234906, 0.81250476952973161]]]])
62536          msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)
62537          arg1=msk_arg1*numarray.array([[[[-0.14596464563710954, 0.32553956300031084, 0.5851281952560472, 0.10028244486474081, 0.41503108634839014], [-0.59491034833646039, 0.67400692823192765, -0.408342778069271, 0.81865165499672088, 0.70040635768967152], [-0.93708784117223343, 0.88785437731268724, -0.13328157360858883, -0.59993538269343971, 0.70948991796999694], [-0.13546972819831926, 0.80431539543913644, 0.51574546136079857, 0.46997984969339113, 0.30239037060724994]], [[-0.96866093056909097, 0.17095540401254739, 0.60484441549436307, 0.077359470935829178, -0.23263291386172691], [0.42367695965361363, -0.99234044286865974, 0.22975234395949662, -0.15714584594544156, -0.51544503820522136], [0.38169426606026757, -0.49812370649572446, -0.73732992875440972, -0.40680929511827935, 0.95732931094821572], [0.043359512726229843, 0.99402373099129027, 0.13838178669653223, 0.63074385975654867, -0.92647403349616675]], [[0.78435924951467739, 0.69785693308355112, -0.39591171595736885, 0.7306987468699857, 0.29820607603398419], [-0.31893049127368522, 0.93212579268095164, -0.22460195372750835, -0.5510240813527012, 0.60146744100528315], [-0.88568374707136255, -0.051755131384399355, 0.51208272637475449, -0.054054719096505499, -0.99103891209164763], [-0.61295077842926937, -0.53752545918221206, -0.85521743903196534, -0.34139684076040555, -0.27761189346939963]]], [[[0.80392693512596036, -0.040944501837175462, 0.12051483699395971, 0.76481034853897212, -0.95981347938961714], [0.80920674822838934, -0.90665428677956217, -0.30245781460098797, 0.75426719507297135, -0.31108423478624436], [0.90254904986746864, -0.58718002543486802, 0.43866048792529289, -0.31158482416597089, 0.85420677508877874], [0.22222448902344438, 0.83959254444407261, 0.059543737777026262, -0.27295424254356337, -0.16187349981592836]], [[-0.21019740268099851, -0.1821889032037598, -0.63407300868259542, -0.44371619311270738, -0.51810049447711859], [-0.090554292693932004, 0.46116432383541439, 0.35931183893935192, -0.31459398836991737, -0.17225344951281074], [0.41543072246974933, -0.68425028829399825, 0.0016260380904280503, 0.16473786619824349, -0.19921546053628769], [0.7741760917839684, -0.71985594144843579, -0.13363464780182399, -0.052491860913901123, -0.51878584979744047]], [[-0.47189481299008129, -0.036580374795098125, 0.2766790167415174, -0.017947506347033126, -0.25811201934278705], [-0.61272138863943915, 0.99260439230982733, 0.86930255035400683, 0.044723406244898456, 0.48809668510076865], [-0.54345921453200274, 0.73055025004564422, 0.91842593379427173, 0.16559462268128411, -0.023954399196097542], [-0.13805093963473314, 0.46980984326554709, -0.17267805545203774, -0.017685910739201338, -0.58520899839790497]]]])+(1.-msk_arg1)*numarray.array([[[[0.46962816423818432, 0.69276884083668544, 0.56083034465305071, 0.71612382617863868, 0.58802806691475129], [0.14520849818992665, -0.29741287409279304, 0.9988902847541441, 0.40097736716928023, 0.40588759990990586], [-0.35607001250748316, 0.85027962664879042, -0.81229948886093806, -0.76838841727969309, -0.75474857207472956], [0.85941018928439972, 0.95289482370839562, -0.9595526443632072, 0.64429987840744918, 0.8338702325746854]], [[0.83341225100434957, -0.93194812396258486, -0.44242239405110806, -0.88275136911918595, -0.1437843395395737], [-0.40836733650869084, -0.19366555256310503, -0.98723058750787374, -0.40650364005102779, 0.74529930068048111], [0.58882242489128767, -0.64607630305015973, 0.10757505930386602, 0.43008774548100215, -0.93884149366645042], [-0.38707049538898008, -0.2912945859645617, 0.95082068504500428, -0.70615672850147249, 0.51255223499192204]], [[0.45669937722025034, -0.3730524661745549, -0.55088883370406116, -0.76433872642386436, -0.15066921563624813], [-0.48183866024124145, -0.6107043279431823, -0.21435092875800477, -0.99705510907189376, 0.85201760426082473], [-0.7368466095257693, -0.90476914550761389, 0.4386198903297911, 0.076695534301121526, -0.60186824496020841], [0.18193327330087561, 0.19869877918148515, -0.65369178419242058, 0.54172443688300098, 0.51985767823481766]]], [[[-0.9452028253108391, 0.76499255118251419, -0.55985315722209039, 0.29240664397412575, 0.7575922485893769], [0.99496332327328796, 0.52397683837339271, 0.84528369379688706, -0.43706782461125937, 0.41082659767659147], [0.1786956551580785, -0.099524168927412004, -0.25055781658348364, -0.98234615586142771, 0.5941383030049987], [-0.70846205188220845, -0.2831483347451007, -0.94574391033030669, -0.72577567925033759, 0.13804838257152019]], [[-0.42249046317440508, 0.64679474418922256, -0.83371793597118704, 0.55250384012276688, 0.98360719582687617], [0.69256386112865465, -0.17314244655203259, 0.21500215518722943, 0.39954660466101299, -0.6786769587760586], [-0.85958793744398765, 0.87986774310830751, 0.34438041008585785, 0.43315186478917833, -0.74109921934820489], [-0.36066718742318593, -0.40563774578677836, 0.064796227435648612, -0.78214310714020852, 0.76368038053630793]], [[0.1245515266389976, -0.46399982405401841, 0.9071036716773595, -0.86778608653779599, -0.78228935965583801], [-0.35395318274460519, 0.13741609063214111, 0.45971109078636485, -0.53605804986668582, 0.9658237671048997], [0.2713457860902897, 0.139703593977339, 0.77126424436720686, 0.23247506169412202, -0.65235718318943881], [-0.79823007411167834, 0.77696568885821948, -0.7379729907058421, 0.52828110580677556, 0.44724568096272899]]]])
62538          res=generalTensorProduct(arg0,arg1,offset=2)
62539          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
62540          ref=msk_ref*numarray.array([[[[-1.195210560588305, -0.35926348642442058, 1.0059536881760078, -0.9164374470596941, 0.90450557649015317], [-0.57334512798457182, -0.088568250077451172, -0.10420368971497873, 0.81389336308842941, 0.19791629954616335], [-0.57307149557131698, 1.4186481961829536, -0.8593016891146561, -0.22561890850026023, 0.96998287714547904], [-0.03474817998718055, 0.85010819538374205, 1.2392598102300518, 0.82120864187673071, 0.95603279709367661]], [[1.4370043898052056, -0.7076355727547331, -1.235005704813968, 0.086163553794902106, -1.4692642695860549], [0.66986251908967653, -0.049604618726655975, 0.14734916262764297, 0.26452538370498624, -0.44520090984210337], [1.5511880865159373, -1.0983912335006973, 1.2060620947912808, 0.61786532683535644, -0.48290423242885633], [1.0092751701512932, -1.069252603067532, -0.32686265184635505, -1.1382718617045395, 0.15257239327939798]], [[-2.0200598280390318, -0.75505569535555372, 0.54398916022957777, -1.0738770838523717, -0.15000516006509557], [0.26521317807458333, -1.134406256595335, 1.378986915299085, -0.77911614478439284, -1.0093365637968106], [0.87272878504914408, -0.056443771323347269, -0.58316582862920219, 0.60003215264160814, 0.35988453521930558], [0.19104139995804958, 0.39502222315949925, 0.2723015231416232, 0.49347840431136691, -0.75922592510780817]], [[-1.3012558057477501, -0.47451123566527575, 0.58560525971271049, -0.57611685897969456, -0.33049996110160962], [0.4376649980149121, -1.2033649968260849, 0.59672978590146875, -0.013598502947235389, -0.79767714298690162], [0.86504180537131414, -0.22982251820024716, -0.6690210171806571, 0.028367188888820911, 0.97751434434091644], [0.36287662989334252, 0.80010819051805138, 0.51813848769163939, 0.53490171989241619, -0.49025353694633167]], [[-0.4027393937227276, 0.24392211295574676, 0.1541983769978989, -0.0025326888236493587, 0.41913802004862888], [0.73219241312229699, -1.511550407137217, -0.57030154358640206, -0.53240886816050514, -0.7731842256144198], [0.49907178613096848, -0.91270904947385167, -1.4859419878107314, -0.31719557751425587, 0.31362071195828212], [-0.10165839825402379, 0.021328755146521661, 0.092200893503477682, 0.48488699367208904, -0.10844777774563408]]], [[[0.71297994429190004, -0.27217574274359452, 0.46503750271096467, 0.55059091346538902, -0.32603229095810538], [0.06905856540956401, -0.028725063013740004, 0.15211947959178951, 0.84890053179296154, 0.31989585220901118], [-0.011085395369595963, 0.941751956117588, 1.2682654105698608, 0.18692598273871477, 0.21827590678829623], [-0.48227749441298101, 0.86446863332250234, 0.087628755097826694, -0.51686738451607561, 0.53168450965492164]], [[1.7620834374903878, 0.6326711670689843, -0.50863494127923836, 1.4104113029745953, -0.49166654846135027], [1.2476420798038408, -1.265881462496788, -1.2239200338408676, -0.032140962863278458, -0.43657491078626903], [0.79143899118614414, -1.5827754431397683, -0.14955581898413506, -0.49021879924735023, -0.022890407589042365], [-0.18637022648933774, -0.11321744719900451, -0.63566318618720452, -0.50053659952000928, -0.096869045586065017]], [[-0.43501202087457669, -1.0701944274515058, -1.0352669892905024, -1.6850344965872543, 0.45247028920814547], [0.19977681475394071, -0.55659140564156151, 0.16079492968876385, -0.89003485990358888, -0.95374484257213632], [1.0850690640974008, -0.55317648879255343, -0.95925241019702989, 1.0723341102742359, -1.1489848130067313], [0.79951731865889708, -2.196959110536306, 0.32717187759568944, -0.25712841465501712, 1.0875968087491585]], [[-1.7319956878012708, -0.48338231283477123, 0.9965737809462627, -0.5879476397280391, 0.062609925560954183], [0.67960614719843204, -1.9701523258187343, 0.68812844706530707, -0.35428274057460862, -1.1071509442077352], [0.90205212055796469, -0.092801308524219417, -1.0594359949077288, 0.12543880523543213, 0.98039412708502394], [-0.12419997238356985, 1.098639823267439, 0.52022637175946351, 0.70511678170675673, -0.4583767345464751]], [[0.95331760985766678, 0.026594040226515306, -0.45096146946821225, -0.082722914826580105, 0.85875831237706268], [-0.16665564341755934, 0.27791195715160799, -0.9007158870005465, 0.063865859694343413, 0.29640332493497951], [-0.43021980931131487, 0.34190124341315609, -0.21362843938945753, 0.15433626540198975, -0.84992761489465052], [-0.27329778414811323, -1.045158340273602, 0.078013527035462701, -0.34090728807241666, 1.3848688307294443]]], [[[1.8186228750372759, 0.34713657454604363, -0.8182703343019132, 0.95980916093399726, -0.19898111071761218], [0.014420044509211517, 0.82405389021350306, -0.37680477009999258, -0.15594157450300208, 0.53437325355939247], [-0.30494654525710563, -0.17660690839734589, 1.27863475002461, 0.2568435567652107, -1.2543725775314181], [-0.43967238618911447, -0.88143050897417508, -0.92884787303149863, -1.0229064136919295, 0.27249356966805799]], [[-0.047908135486939896, -0.088176368325782642, 0.13460974975970783, -0.14461989526624794, -0.149774366125278], [-0.38041941661419254, 0.60496815524943615, 0.010851414388230896, 0.63531010980362967, 0.37041979958454596], [-0.24532769199074705, 0.45626235356428818, 0.25135436961475593, -0.18007273621181211, 0.43856847482599526], [0.29924931292105295, 0.31682493254863864, 0.36688300936672968, 0.11315655287151082, 0.14497065810132814]], [[1.1402545701753135, 0.74250997252219275, 0.54605459155856395, 1.3393458911899696, 0.03313319509349804], [0.14080154608526277, -0.02606250530667073, -0.95062823373634453, 0.94166806628271382, 0.63471349653973752], [-0.64842837801275843, 0.35838302856748078, 0.40653923775079914, -0.81331360950651788, 0.65649462409458792], [-0.67362825048033892, 1.1866536724667038, -0.039998841285130558, -0.041558174971287172, 0.215100292063654]], [[0.093428574313362989, -0.60733860180253951, -0.2385046505519226, -0.29853246024518965, -0.40323325804948618], [-0.2563226623046142, 0.59398144441607081, 0.88388605974563983, -0.052988933389057226, 0.10474319107869479], [0.18458273250303281, 0.54861227825673675, 1.2156601621344165, 0.781518807571844, -0.63571651088709469], [0.033759094558088634, -0.35794501273774598, -0.20016814682404604, -0.60917538863945331, 0.12325278286298458]], [[0.23401358346454859, 0.4649524987595533, 0.094161913411856563, 0.68203996956320778, -0.14464875217910292], [0.4119696063996664, -0.49921213522822516, -0.20743367952459607, -0.26343918316520776, -0.1420320919872535], [0.065508310060737568, -0.57177853171022852, -0.12206520764973937, -0.30613908866242057, 0.11784184970043439], [-0.31242922318820254, 0.35851514951799951, -0.40508468885534055, 0.036303371704085076, -0.57829036937870981]]], [[[-0.12504680990426628, -0.61892292597869036, 0.084385065972809287, -0.42147171248384729, -0.61476808474388267], [0.78287099711025809, -1.371867509757112, -0.30123642003198803, 0.74715633756146915, -0.8197732258567525], [1.3827308588885254, -0.63152677942064028, -0.66490672057538625, -0.14743367895005188, 1.1485074699849329], [0.88536510793730139, 0.37617670472662024, 0.83164423342833604, 0.17856314681759924, 0.38291938618520649]], [[-0.92048552123693217, -0.46240197080822298, 0.77548446778914637, -0.021411308886113645, -1.3720100859860931], [0.98993638515195848, -1.7552255965628045, 0.42088640452073844, 0.84515772870470718, -0.99047486568384924], [1.6119198385739704, -0.80131478934687828, -0.40034242671360348, -0.47580343447988682, 2.1543794504660498], [0.8757347019400602, 1.7951811666566091, 0.74262854472170825, 0.55271656789785417, -0.95711702427127598]], [[-1.3117284501862774, 0.154053134367652, 1.1530449322768728, -0.23613490531595202, 0.42937837430751513], [-0.28339197624634554, -0.31972826085534267, 0.082486666324565902, 0.47978376821010899, 0.097326157520819273], [-0.51812211629644545, 0.74547906754158233, -0.7979468249354853, -0.58969875451617859, 1.2792472914302562], [-0.18072876787806752, 1.4505832499864537, 0.73046946729074791, 0.9726271952234079, -0.23378856147683164]], [[0.86289605439951855, -0.20707058903026598, -0.28580666213136841, -0.30371963901380011, 1.2308705024982602], [0.043857501493038908, -0.35691291027827188, -1.0439940259389719, 0.0336070347350075, 0.023484334272699914], [-0.23826687899847654, 0.53520502470989073, -0.55940847897761048, 0.3349543318081144, -0.90320323783531975], [-0.47705987044601345, -1.0990003320077508, 0.30934985875917309, -0.33134318054700551, 1.9503885641802645]], [[-1.505394981541307, -0.71610801914065458, -0.54790824331322308, -1.7021429926057177, 0.064696227002304763], [-1.2541273298619717, 1.8239950072017743, 1.4611463646609466, -0.69380094331243658, 0.25021593106534362], [-0.37556911458734965, 0.60684738176378783, 0.27604876178743731, 0.85369940694362201, -0.84506313954047108], [0.81998285022687545, -1.2531586140532582, 0.10739656387572308, 0.13367089060326742, -0.34483053352753434]]]])+(1.-msk_ref)*numarray.array([[[[0.63022680399559083, 0.10650829861339661, 1.7418999387166261, 0.87471197923919408, -0.41142066098902497], [-0.37891481250784365, 0.17113048761791777, 0.31175181264599072, 1.3878279250136765, -0.55885989482807619], [0.77810714801765091, 1.1313783499060812, -1.0584599474877938, -0.25353317759385013, 0.18619971825453252], [1.1144394500027501, 0.85436976899453032, 0.50894445454107184, 0.82085982622646303, -0.48931091485712724]], [[-2.4557585174308869, 1.8120938447359494, -0.9272665610433346, 1.2598690074798797, 1.2917541437712545], [1.9226009257952168, 0.88383153654284541, 1.4578429439384244, 0.22631672123317462, -1.226814174410177], [-0.70747545708178905, 0.95531119637873485, 0.39523861045075304, -0.55957618372002027, 1.4200458254101247], [-1.2351695409194594, -0.86650458526404373, -1.1515967081176048, -1.1106157621069888, -0.31753014971208016]], [[0.60060580811916209, -2.0493584750368723, 0.90067717924146851, -1.5763998739984257, -1.9106662077679051], [-1.153333144721318, 0.49767941635043467, -1.8473517231179433, 0.041097659480178517, -0.064743286142106449], [1.7982923291798301, -0.63723115407377451, 0.99349898019095439, 1.6379512101409948, 0.07822836102224584], [-1.1540957277713113, -0.48323300180599421, 2.3605462865150648, -0.49937001821127452, -1.0197585429255656]], [[0.25384733825377004, -0.78364279397318803, 0.30657958941849839, -0.47632036591366955, -0.52603017944205877], [-0.23948446901889059, 0.37598879276346769, -0.80974807243229208, 0.26585482696277934, -0.077202068317965722], [1.1161007143767667, -0.054028998289547117, 0.14076095897963067, 0.58099570095460507, -0.051092428648090576], [-0.63256827262827076, -0.36917603831766005, 1.3301133212392673, -0.71870700336649029, -0.32581893233535852]], [[0.87899462961944819, -0.8039369453494748, -1.0204315274452977, -0.27567244924589651, 0.08959577581346978], [-0.50199584485595672, -0.4304287765225987, -1.684838890123034, 0.060189336671600979, -0.2851790411186319], [0.28378971968750821, -1.0144052348870596, -0.44323892559909595, 0.46887447438564722, -0.11102675390291372], [0.61198462589892311, -0.92150368445922037, 1.7858586417608477, -0.71537493336166447, -0.27941223405417154]]], [[[-0.84063813106797924, 0.066799190347369974, 1.4085264461230633, -0.34419562781278079, -1.008548141015815], [0.06903390947670035, 0.93453111617741802, 1.106370943804261, -0.55027403048364298, 0.76350510702704977], [1.0135978248832438, -0.26051991236187255, 0.08782243662208844, -0.92373663870435863, 1.4622074397423652], [-0.68331179920775686, 0.68755766861377876, -1.3492610915327239, 0.80211285798104703, -0.92930483872041281]], [[-0.48180040811031066, 0.51546694169590357, -2.1358170697455665, 0.10847197946592868, 1.2243288637673431], [0.72507352960563676, -0.21464057547140392, -0.23895637246687834, -0.96500005416629231, 0.3163496146214837], [-0.62054365205609086, -1.3449155820099752, -0.41604404280574175, -0.84587730446707288, 0.53972301361220143], [0.060549819581631747, -1.0701425999949727, -0.40581378813675539, -0.96262257521100625, 0.16394371488672249]], [[-0.757806907993263, 0.21858187769324025, -0.017490590302390863, 1.2600634244824196, -0.11932491842283366], [0.15275770048430243, 0.3488920746542481, -1.0398215132857285, 1.8270816269619317, -2.9898516049514003], [0.010913393513441394, 0.83673533313432502, -0.034218058508480254, 1.1649114114298982, 1.6076797322036982], [0.49410224291771454, -1.2384650957849108, 2.2583872489240617, -0.52772077100978909, -1.8292273921146449]], [[0.87760249762956066, -2.0301548968337091, 0.74632480677103841, -1.4551758469535527, -1.7296702594711184], [-1.182080596836963, 0.46044130453495119, -1.9463377013372045, -0.071211495933917263, 0.2540137470101117], [2.0916032697442675, -1.1241936818261491, 0.28536938964435038, 1.0219157261716236, 0.37525705766884487], [-0.64471960012340823, -0.51266461442261568, 2.3647673592184955, -0.49559644014125359, -1.1556756216245505]], [[-0.27467161155622882, 0.72970174057015191, 0.14944751539132983, 1.1345260469656164, 0.23777544849293153], [0.089250370133237833, -0.098995688006076679, 0.25567207223255217, 0.72119614838050339, -1.1083141013130491], [-0.51204458798142294, 0.23403390940949348, -0.77137940090527346, -0.46331289657369057, 1.1581395017764005], [1.3072163123654894, -0.006887188733738614, -0.10886474244496447, 0.71053956131136453, -0.87747748768768208]]], [[[-0.83690264316221585, 0.50636712495338276, -0.50091828369651603, -0.12747097681817965, 0.10763297055208709], [0.3236222401990333, 0.02157727827281394, 0.70512149458139695, -0.93782201207490967, 0.35966268363627368], [-0.7653827888002066, -0.63865881347062481, 0.40487542747789335, -0.56703678152613168, 0.74205419141351614], [-0.21652464166835253, 0.0083347931208748692, -1.4964019839267781, 0.46053562428847822, -0.14275434854319996]], [[-0.30511505037132025, 0.91594657745363828, 0.3673916999038217, 0.81587124037301606, 0.65775938440444437], [0.58738901394636855, 0.076306332572508351, 1.1259665027044119, 0.48228271610138651, -0.098618472848994027], [-0.36118071911156119, 1.105472614795423, -0.34054049534620656, -0.51392938913991981, -0.31873231311975236], [0.13510315153519656, 0.53126944482600136, -0.89054795804237707, 0.15098381065195854, 0.56593358410211403]], [[0.12276408325064334, 0.54663456535627986, -0.11818936161313487, 0.060112481762454387, 0.51864401008165895], [0.24854484459845913, -0.14120119500147593, 1.0025724639692237, -0.81871474477362138, 1.3633849377602683], [-0.17881607969976784, -0.52664384091585015, -0.75753386040235504, -1.4681797014769769, -0.042761978052623689], [0.45699205831223133, 0.65954225580144987, -1.7019076045105521, 0.52734578120961073, 0.60511611283704092]], [[-0.90169214192794878, -0.17674548141779925, 1.1166855046905471, -0.42949943980893912, -1.0872928155438264], [-0.03156477609430719, 0.75864641065066629, 0.51623560424967097, -0.16197370660146881, -0.088802273557637035], [0.56609482792525179, 0.18978465419123222, 0.87512137485275765, 0.2401779222753434, 0.97375623845701376], [-1.0403848642656288, 0.26276536098898073, -0.47464870777719226, 0.4374077510117656, -0.85331642006942543]], [[0.44288417014448206, -0.5840406771087544, -0.79390184793699281, -0.82689124533608505, -0.01643688356061751], [-0.27416161558402297, -0.28862606648139827, -0.6310210816291999, -0.8880419523476899, 0.86175574921696285], [0.028999100537547493, -1.078802778865557, 0.17136995607685745, 0.025471646684351035, -0.43713213611948609], [-0.20945104359392502, -0.28757146149485419, 0.10718780082090709, -0.31738814300073204, 0.36701701231451456]]], [[[-0.95707275555340654, 1.1634370406271679, -0.36436805391305571, 1.4674643044056856, 1.1682212462418953], [1.2238285274445415, 0.59287183523754405, 0.52327153766005552, 1.1025213247070766, -1.2209930440437029], [0.23984198603131934, 1.0359120741375389, -0.82879945882546768, -0.55024730409820621, 0.82720104105707071], [-0.054720570780689204, -0.66536888127881255, 0.39010346240538207, -1.1309641403059352, -0.32153225897069126]], [[-0.49610530037442102, 0.27980343559945731, -0.38998783596354436, 0.1062408601903965, 0.75992439964447134], [0.96572570152693959, 0.67203923454287628, 0.29381032010309782, 0.095912398501095314, 0.33420127363433683], [0.92334941880044608, 0.46076525317121608, -0.18701421809804705, -0.34184729881893261, -0.29014745344973958], [-1.2647034707306024, -0.47552127519222659, 0.26844674485028297, -1.6186925768430953, 0.55022817851409089]], [[1.1882994037440122, -0.60137628793991271, 0.81345741046762532, -0.29308058228999717, -0.33660535254046298], [-0.61494910530095437, -0.20573505262217648, -0.25298284226752099, 0.25033846270310184, 0.72227992479972714], [0.70679786559143054, 0.17328445686846597, -0.52301341962281667, -0.013610826197959953, -0.98741209638367966], [0.44000036588049563, 0.66863160657654896, 0.45800369321675349, 0.27844178570817257, 0.49655301832898446]], [[-0.23387557506387002, 0.34129224580711043, 0.63715992102087204, 1.1144627116960342, -0.40891161885237837], [-0.27471768386483791, 0.16024430859898614, -0.23873602364178556, 0.99726873951885286, -1.5268285550049898], [0.14268551823292008, -0.098717076825267952, -1.0012247561091274, -0.38472332691890831, 2.0867835450943955], [1.5821920413421671, -0.17566705726339904, 0.60620965882911992, 0.91889968195100269, -1.8901597144785778]], [[-0.041537260595030212, 0.0036798898484334264, 0.91656285446048735, 0.27464439198526358, -0.33595927080459842], [-0.14193765231527644, -0.070834261246743607, 0.1362712171560955, 1.1198769719819537, -1.1443410032195815], [-0.49215839187524529, 1.7828156815931213, 0.98391627917040991, 1.4558838634460309, -1.0149675498557094], [-0.38803445619578153, 0.37631218511412901, 0.57369772071792402, 0.20654723802701674, 0.35451384343955417]]]])
62541          self.failUnless(isinstance(res,Data),"wrong type of result.")
62542          self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
62543          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62544       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62545       def test_generalTensorProduct_array_rank3_float_rank0_offset0(self):
62546          arg0=numarray.array([[[-0.62223345792067097, 0.94045268746400112], [-0.79925664192828227, 0.7348180330657752]], [[-0.52285980947748656, 0.9484339098536958], [-0.26976114766560477, 0.80867919818818312]], [[-0.66887932544025563, -0.16897691014482086], [-0.11666956432574094, 0.87840637485387285]], [[-0.75996137452098811, -0.69907581444637179], [-0.25818556086714128, 0.68533204997103825]], [[0.99997724993398629, -0.85531524152814642], [0.030116971944277315, 0.58502350415621174]], [[0.56707215125247457, -0.94111728184045429], [0.10221081042239866, 0.94735620847985524]]])
62547          arg1=0.136538970045
62548          res=generalTensorProduct(arg0,arg1,offset=0)
62549          ref=numarray.array([[[-0.084959115471768029, 0.12840844132199519], [-0.10912967869018003, 0.10033129740498756]], [[-0.071390739863763111, 0.12949818920678086], [-0.03683290926030644, 0.11041622481709404]], [[-0.091328094179728203, -0.02307193327248995], [-0.015929942148586933, 0.11993670170314402]], [[-0.1037643433507616, -0.095451091687585879], [-0.03525239056118256, 0.093574532241588501]], [[0.13653586377400143, -0.11678386214168718], [0.0041121403301332387, 0.079878506709362196]], [[0.077427447472979083, -0.12849918435365351], [0.013955758782496481, 0.12935104097118102]]])
62550          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
62551          self.failUnlessEqual(res.shape,(6, 2, 2),"wrong shape of result.")
62552          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62553       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62554       def test_generalTensorProduct_array_rank3_array_rank0_offset0(self):
62555          arg0=numarray.array([[[0.17558279902393736, -0.019125688238290417], [0.50487292322875765, 0.98652313475801967]], [[0.66359902276666327, -0.48997636334875394], [-0.48810313677326866, 0.33562332386468507]], [[-0.31591844861947949, 0.17372785494835941], [-0.76593833060090066, -0.89308363898908949]], [[0.88393558729223898, -0.35792002127422795], [-0.55268453327916078, -0.072250131844577181]], [[0.95824831409375233, -0.095616899502661834], [0.11691656092252667, -0.33809677449523612]], [[-0.74241747262302127, -0.99779773178096876], [0.063807299019483787, -0.92453812497314947]]])
62556          arg1=numarray.array(0.638351066257)
62557          res=generalTensorProduct(arg0,arg1,offset=0)
62558          ref=numarray.array([[[0.11208346697334332, -0.012208903479814306], [0.322286168867436, 0.62974809496011686]], [[0.42360914375029479, -0.31277693398447232], [-0.31158115780267009, 0.21424550664978673]], [[-0.20166687852654583, 0.11089936144485077], [-0.4889375500262978, -0.57010089320549084]], [[0.56426122465063089, -0.2284786272151812], [-0.35280676112258141, -0.046120948700204702]], [[0.61169883304085237, -0.061037149749725864], [0.074633811328012625, -0.21582443649713337]], [[-0.47392298525683574, -0.63694524599133595], [0.04073145736407556, -0.59017989787198577]]])
62559          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
62560          self.failUnlessEqual(res.shape,(6, 2, 2),"wrong shape of result.")
62561          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62562       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62563       def test_generalTensorProduct_array_rank4_array_rank1_offset1(self):
62564          arg0=numarray.array([[[[-0.20889521568146496, 0.72665774192703791, -0.5750361336697507], [0.25766776281353332, -0.83614139486165695, 0.065410093689466153]], [[-0.42033994910957206, -0.18205837857278762, -0.33252473823465345], [-0.21099990582116201, 0.22168052746517208, -0.46478875867069003]]], [[[-0.95360673890381231, 0.68189731291604372, -0.042893871381559423], [-0.90505779586379775, 0.58834567838131702, 0.77148374064232428]], [[0.45866177814716602, -0.77863507136370691, 0.38806715525809277], [0.80968494065005681, 0.17889384669767483, 0.84256269216033997]]], [[[0.76928134910903245, -0.58522333929811898, 0.44213002505928389], [-0.66048202530097311, 0.82816212353571883, 0.61435006906615874]], [[0.83335750031649947, 0.82163062833021261, -0.23711855819091032], [0.36430833357787384, 0.38098707024630629, -0.018900944776325757]]], [[[-0.38610975619779087, 0.58163411543977439, 0.75018438530273168], [0.39214627485184317, -0.70060403801740123, 0.012204449378992566]], [[0.9342207642283773, 0.92923415021598244, 0.49878054152099671], [-0.9617303854986885, -0.45072460871829367, -0.95944649261468218]]], [[[-0.98132949880130038, -0.83680984049555796, 0.3503218632681091], [-0.084263214659299424, 0.89879745499590413, 0.71954314796292951]], [[0.97633786906109155, 0.97901535997287392, 0.82796363289730746], [0.18933060418947067, 0.56976437023975968, -0.3686848441258288]]], [[[0.34829026414095354, 0.75194592922962844, 0.43768893808489495], [0.35869992176297982, -0.84488652488833949, -0.78749817935658672]], [[0.90983693698893964, 0.10845426457079066, 0.62225378637699746], [-0.072528098043548095, 0.14963170447864749, 0.19475419465482258]]]])
62565          arg1=numarray.array([-0.69937824062575737, 0.064730560230942702, -0.69251107716968563])
62566          res=generalTensorProduct(arg0,arg1,offset=1)
62567          ref=numarray.array([[[0.59135262348866036, -0.27962834198284309], [0.51246893789366688, 0.48378961156391687]], [[0.74077587946286594, 0.13680063805581111], [-0.63992035552963666, -1.1381801278653458]], [[-0.88208041100193935, 0.09008992695016943], [-0.36544026335920621, -0.21703870125862793]], [[-0.21182473262197665, -0.32806078004046285], [-0.9386348773928731, 1.3078649726214668]], [[0.3895515576758769, -0.38118007885195304], [-1.1928312356695456, 0.15978580057232161]], [[-0.49801718887799618, 0.23979431417261005], [-1.0602174908194004, -0.074459119458883005]]])
62568          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
62569          self.failUnlessEqual(res.shape,(6, 2, 2),"wrong shape of result.")
62570          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62571       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62572       def test_generalTensorProduct_array_rank3_array_rank1_offset0(self):
62573          arg0=numarray.array([[[-0.83155615260986693, 0.84405284607142317], [0.06920721719314904, -0.26587232938368954]], [[0.33588285234513182, 0.59507917855993231], [-0.3342911023420907, 0.78810807971267116]], [[0.37242539442302292, 0.46704224572593622], [-0.54463086394590676, 0.054424241271898932]], [[0.59658971209940215, -0.85004776127142057], [-0.52308745183080707, 0.55488532809846935]], [[0.95525511176763001, 0.80476259905525582], [0.026107606064554867, 0.98498385503909192]], [[-0.2752224859075425, 0.90734992618845522], [0.81284698632923691, -0.1167623813778722]]])
62574          arg1=numarray.array([0.31358180414477865, -0.94831831647067899])
62575          res=generalTensorProduct(arg0,arg1,offset=0)
62576          ref=numarray.array([[[[-0.26076087858309294, 0.78857993069382404], [0.26467961426461201, -0.80043077399873719]], [[0.021702124027267219, -0.065630471696227724], [-0.083372724720312208, 0.25213159979727828]]], [[[0.10532675081968074, -0.31852386106730507], [0.18660600242181646, -0.56432448477870956]], [[-0.10482760698197964, 0.31701437538417893], [0.24713635349737645, -0.74737732735006002]]], [[[0.11678582709250231, -0.3531778230501697], [0.14645595002656811, -0.44290471618750499]], [[-0.17078632890908693, 0.51648342399515368], [0.017066451767252789, -0.051611504858161239]]], [[[0.1870796782543446, -0.56575695140183213], [-0.26655951058872218, 0.8061158618885832]], [[-0.16403070687059948, 0.49605341168712835], [0.17400194227858545, -0.52620792017662077]]], [[[0.29955062136661559, -0.90588591939148921], [0.25235890771998826, -0.76317111309464825]], [[0.0081868702116242795, -0.024758321030218359], [0.30887301431663755, -0.93407823116147093]]], [[[-0.086304763672098092, 0.26099852449071587], [0.28452842684480756, -0.86045655445283076]], [[0.25489402446676834, -0.77083768562400701], [-0.036614558208713871, 0.11072790493537113]]]])
62577          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
62578          self.failUnlessEqual(res.shape,(6, 2, 2, 2),"wrong shape of result.")
62579          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62580       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62581       def test_generalTensorProduct_array_rank4_array_rank2_offset1(self):
62582          arg0=numarray.array([[[[0.33881633614852791, -0.078710118281992481, 0.28936033755159873], [0.99651117135084544, 0.12935344346535604, 0.76982281325046253]], [[0.94568937776322226, 0.53029110485663011, -0.95629650395515431], [0.8519099176151983, 0.23580308684108098, -0.61073582071267629]]], [[[0.1027651020332403, 0.19125074631601735, 0.59515848346470923], [-0.3603365861526997, 0.07418275922225015, -0.61585124508676192]], [[-0.58139677734686579, -0.49835955907273854, -0.56145683446421502], [0.94422324814008918, 0.72985919537938071, 0.44584205979459823]]], [[[0.6363217522257445, -0.32503372260170216, 0.062910953700197059], [-0.85635554779269385, -0.89371169862927324, -0.71528032711649248]], [[-0.30640101362044758, -0.72607347987536563, -0.2808504415839419], [0.48794058631490667, -0.75831780769556123, -0.44612303063615966]]], [[[-0.11769327607903324, -0.67083179921015779, 0.28668412116015762], [-0.2967589710750782, 0.83948161256650078, 0.16926038050581127]], [[-0.97867375649406441, -0.56030778897280076, -0.77117315826862698], [0.85979177175858346, 0.79551014799279218, -0.68799821974552589]]], [[[0.92369355119495467, -0.45385181259992868, 0.88546770255329532], [0.093860455944780208, -0.87561910343607341, -0.67844214091654331]], [[0.28608959251228394, -0.25419712325320765, 0.73403411870471413], [-0.11839510997027003, -0.95357577361281565, -0.83194451143914572]]], [[[-0.46036332717980022, -0.1052912078318029, -0.30251158160901981], [0.66715988250296254, -0.92093106385795886, 0.55072763658799007]], [[0.84605898137882973, 0.56332082906234215, 0.53947803001839567], [0.19643369354525153, -0.23316575994900957, -0.28323814184717899]]]])
62583          arg1=numarray.array([[0.73824001081410406, -0.010511085246545537], [0.92339577186120758, 0.76388651667593299], [0.19084801126886908, 0.82554251298949133]])
62584          res=generalTensorProduct(arg0,arg1,offset=1)
62585          ref=numarray.array([[[[0.23267103019980823, 0.17519233474807297], [1.002027993624278, 0.72385839728501111]], [[1.0053070145837117, -0.3943214157914619], [0.73009584338008693, -0.33301608334180732]]], [[[0.36605025350887854, 0.63634232373364441], [-0.31504882440952797, -0.44795664638243826]], [[-0.996546393181028, -0.83808552260218128], [1.4561003464370263, 0.91566636180852745]]], [[[0.18162984248237338, -0.20304164353007553], [-1.5939553605702939, -1.2641874089539402]], [[-0.95025041722635695, -0.78327111353838952], [-0.42515188681353633, -0.95269106156576089]]], [[[-0.65161603804025958, -0.27453235249954405], [0.58839743258963328, 0.78411958355189171]], [[-1.3870588314555443, -1.0543608689288855], [1.2380003020152062, 0.030670352062319273]]], [[[0.43181244249187312, 0.37459093046456637], [-0.86873076721699649, -1.2299430320426146]], [[0.11656718679706859, 0.40879150384953455], [-1.126706800262355, -1.4139847776392673]]], [[[-0.49481781749756071, -0.32532778710080323], [-0.25275445747473718, -0.25585031978556866]], [[1.247720972472252, 0.8667822364105594], [-0.1243445009196438, -0.41400203886868781]]]])
62586          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
62587          self.failUnlessEqual(res.shape,(6, 2, 2, 2),"wrong shape of result.")
62588          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62589       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62590       def test_generalTensorProduct_array_rank3_Symbol_rank0_offset0(self):
62591          arg0=numarray.array([[[0.24065763915758764, 0.0059764947832416926], [-0.17431367676333864, 0.88530347261035369]], [[-0.75594891191674685, 0.72661963716969935], [0.75789935113136697, -0.98811838569064214]], [[0.17055307126729247, -0.33829811680624711], [0.70225566755190783, -0.22794298537778768]], [[-0.99292830617484351, -0.39548424274520877], [-0.69094434945079697, -0.70579904952539696]], [[0.020847067184338375, -0.14520810361153758], [-0.688882355062024, 0.55434238255671908]], [[-0.53169630686415781, 0.25043016358327597], [-0.1313117717286183, -0.32954102546451769]]])
62592          arg1=Symbol(shape=())
62593          res=generalTensorProduct(arg0,arg1,offset=0)
62594          s1=numarray.array(-0.873783967046)
62595          sub=res.substitute({arg1:s1})
62596          ref=numarray.array([[[-0.21028278664298891, -0.005222165320729338], [0.15231249599260593, -0.77356398033688034]], [[0.66053603913855641, -0.63490858909950554], [-0.66224030165298886, 0.86340200295964187]], [[-0.14902653920377654, 0.29559947054707941], [-0.61361974307388889, 0.19917292602366166]], [[0.86760483436150215, 0.34556779053000497], [0.60373609467098344, 0.61671589343144273]], [[-0.018215833065601095, 0.12688051282088403], [0.60193435703393527, -0.48437548613201969]], [[0.46458770827535451, -0.21882186180371863], [0.11473812082084207, 0.28794766453472087]]])
62597          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
62598          self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
62599          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62600       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62601       def test_generalTensorProduct_array_rank4_Symbol_rank1_offset1(self):
62602          arg0=numarray.array([[[[0.95370435765413397, 0.042343274710906487, 0.23239615679808434], [-0.90634273085471895, -0.69539061031685323, 0.18354304459110771]], [[0.63359176495154701, -0.46576595252856601, -0.18503951782328687], [-0.47273953405901659, -0.90598353634139572, 0.022895006453276467]]], [[[-0.26667400814319686, 0.51437021415746198, -0.91334337407107657], [0.81554676889603916, -0.39567961124026585, -0.87603223620839499]], [[0.23315733519702841, -0.95423518806483809, -0.76642649077808778], [-0.22118914822427738, -0.40793105370662297, 0.66726982499800891]]], [[[0.56606997559119665, 0.80479983922579179, -0.59988354200707072], [0.46320094311867455, 0.77267312711199265, -0.19248727731704607]], [[-0.307147601905158, 0.56394905506091675, 0.47963125352707681], [-0.85706865067830362, -0.58442280781483635, -0.27605176148930766]]], [[[0.18816097339682769, -0.70568786411416418, -0.58014359830143269], [-0.53465756687902211, 0.63913087123978762, 0.66230008962005504]], [[0.27279063355275746, -0.2582471060329794, -0.065966369984664874], [-0.99809343851415222, -0.20306106697795245, 0.22735636578683383]]], [[[-0.31307089307684621, -0.82674704924257547, 0.086763093000316704], [-0.27894581996149981, 0.038499913604932878, -0.85647362239211144]], [[-0.83250525584287516, -0.9314196473129972, 0.6370036411665212], [-0.47671196915832059, 0.043754706308863689, -0.64786666558882477]]], [[[0.65345901516075444, -0.31410516966124225, 0.95440587786249331], [0.33805429246285312, 0.88524464642259071, -0.62117901499228112]], [[-0.57031620426787577, -0.76688430100083238, 0.15613033944530774], [0.99298711992427435, -0.14982198486593967, -0.5813988557877845]]]])
62603          arg1=Symbol(shape=(3,))
62604          res=generalTensorProduct(arg0,arg1,offset=1)
62605          s1=numarray.array([-0.57303431819719308, -0.49044263366298457, 0.17853213678519797])
62606          sub=res.substitute({arg1:s1})
62607          ref=numarray.array([[[-0.52578209106333096, 0.8931830231195349], [-0.16767384512240152, 0.7193164226267601]], [[-0.26251686826344123, -0.42967804307184376], [0.19755870507371612, 0.4459448607472889]], [[-0.82618416581304244, -0.67874704497310345], [-0.014948950611050393, 0.72847150008505068]], [[0.13470244327137737, 0.11116195675222781], [-0.041440120879151429, 0.71212201531477259]], [[0.6003623663527462, -0.01194453717442806], [1.0475876077485469, 0.13604812466633592]], [[-0.050011753831490369, -0.73877884369533497], [0.73079779668526768, -0.59933498845439603]]])
62608          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
62609          self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
62610          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62611       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62612       def test_generalTensorProduct_array_rank3_Symbol_rank1_offset0(self):
62613          arg0=numarray.array([[[-0.065970879382520442, 0.40423884455124215], [0.73672640606208573, 0.42909698018919107]], [[0.61724141589285209, 0.19418407127289439], [0.15716810903802103, 0.37993052282970941]], [[0.85022994542572272, -0.99275578996357861], [0.77498721581328422, 0.85430072811127089]], [[-0.35889884127899796, -0.58336434667782933], [-0.055507575963487321, -0.73771032106783374]], [[0.99386149520533795, 0.21246082072337957], [0.36632091594591598, -0.53489525343006661]], [[-0.67861034070593651, -0.11443972397939728], [-0.091779592608151495, -0.046641304189924737]]])
62614          arg1=Symbol(shape=(2,))
62615          res=generalTensorProduct(arg0,arg1,offset=0)
62616          s1=numarray.array([-0.72700445839248617, -0.5932269101047194])
62617          sub=res.substitute({arg1:s1})
62618          ref=numarray.array([[[[0.047961123435165308, 0.039135700932983741], [-0.29388344224418023, -0.23980536069743535]], [[-0.53560338182260947, -0.43704592946076593], [-0.31195541768029422, -0.25455187569289983]]], [[[-0.44873726125859426, -0.36616421793877868], [-0.14117268556419851, -0.11519521659277374]], [[-0.11426191598775769, -0.093236351691626834], [-0.276211183976587, -0.22538501011273906]]], [[[-0.6181209609833006, -0.50437928340340565], [0.72173788539847628, 0.58892944976866357]], [[-0.56341916109343748, -0.45974327140757393], [-0.62108043814484104, -0.50679418123766118]]], [[[0.2609210577217288, 0.21290845065210406], [0.42410848090200187, 0.34606742884494701]], [[0.040354255200014885, 0.032928587776222575], [0.53631869241846752, 0.43762961431943148]]], [[[-0.7225417380389032, -0.58958538387271897], [-0.15445996389962366, -0.12603747619604319]], [[-0.26631693909510012, -0.21731142507332638], [0.3888712340166372, 0.31731425842199923]]], [[[0.49335274320445988, 0.4025699155820936], [0.083198189550227328, 0.067888723849534816]], [[0.066724173015572208, 0.054446124133603654], [0.033908436091315428, 0.027668876767843353]]]])
62619          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
62620          self.failUnlessEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
62621          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62622       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62623       def test_generalTensorProduct_array_rank4_Symbol_rank2_offset1(self):
62624          arg0=numarray.array([[[[-0.48507674240520715, 0.6728499067569802, -0.93297419320718289], [0.80932617830733178, -0.91521870468234123, 0.72425022656761473]], [[-0.12376528740472814, 0.36390074441539144, 0.5576779771121041], [0.28192286510355902, 0.38671745421198356, 0.41282481836628637]]], [[[-0.70667467673702755, 0.91980184002271392, 0.75781541925499973], [-0.44085935170856416, -0.28760215575408732, 0.87144794417496052]], [[-0.54148434817896218, -0.079687111054196791, -0.93204297275488224], [-0.94458566270997246, 0.76312145372336349, -0.73779472113235611]]], [[[-0.39507176348307849, -0.4517027995909586, 0.66024039683110769], [-0.83707158320910469, -0.49636207192089588, 0.28940111787356249]], [[-0.65948758671462659, -0.15615042220710795, 0.064095890738169903], [-0.36899991243581387, -0.96897783469783194, -0.18314872386948089]]], [[[0.57273290036006452, -0.032974376776450987, -0.15477689212125623], [-0.74318313069599951, -0.93126181804979402, -0.47903129733963912]], [[0.20133551974772534, 0.22039659432695502, 0.48839474968702179], [-0.81032509975062417, 0.86341282229249661, -0.72532953254755417]]], [[[-0.19485799689054129, -0.89804363026873024, -0.0052631455969986973], [-0.72130162517187379, 0.61814342254942667, -0.073109258333128535]], [[0.93850951995036791, 0.069423396932703163, -0.63822733367500506], [0.49572544032586796, 0.43552767233274836, 0.17698840545067918]]], [[[0.87741962944386831, -0.64412451929441561, 0.85132689144272922], [0.31060137944372168, 0.48944954953570297, -0.97486767318037137]], [[0.35758196619977634, 0.70456158876609631, -0.76301944509387165], [0.22693891253967013, -0.69794167851943989, 0.4642715096555956]]]])
62625          arg1=Symbol(shape=(3, 2))
62626          res=generalTensorProduct(arg0,arg1,offset=1)
62627          s1=numarray.array([[-0.03079837925051554, 0.43225208666057791], [-0.17513940791290761, -0.85120751751271873], [0.03722361753706438, 0.48463259982869245]])
62628          sub=res.substitute({arg1:s1})
62629          ref=numarray.array([[[[-0.13763163134536779, -1.2345600417115137], [0.16232414090688904, 1.4798692411842194]], [[-0.039162798927573406, -0.092983925096650544], [-0.061045400130450379, -0.0072466924616179096]]], [[[-0.11112048362786045, -0.72114178763531356], [0.096386669760733221, 0.47657882513176686]], [[-0.0040608173841802306, -0.61792588045445784], [-0.13202432061630182, -1.4154332157628706]]], [[[0.11585506689004585, 0.53369624457531728], [0.12348556399267763, 0.20093440464924076]], [[0.050045122219882852, -0.1210855140718958], [0.17425334544659579, 0.57654039286586611]]], [[[-0.017625488085509355, 0.20062310105508516], [0.1681582015364452, 0.23930041825323881]], [[-0.026621117360774302, 0.13611647788804598], [-0.15326029985027667, -1.4367265373839457]]], [[[0.16308822685470964, 0.67764302144676847], [-0.088767743095119089, -0.87338359070485305]], [[-0.064820474930165878, 0.037273208988325368], [-0.084957450064338302, -0.070671721709763893]]], [[[0.11747795102803318, 1.340130863445705], [-0.13157602480447739, -0.75481769656615294]], [[-0.16281178850035471, -0.81494666726204956], [0.13252960674731465, 0.91718913078173037]]]])
62630          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
62631          self.failUnlessEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
62632          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
62633       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62634       def test_generalTensorProduct_array_rank3_constData_rank0_offset0(self):
62635          arg0=numarray.array([[[-0.70886038751130376, 0.12862615033568092], [0.092015739768248839, 0.39378077249833177]], [[-0.38011972374010283, -0.928117066912024], [0.39050698408120521, 0.23741582266244454]], [[0.78265102430780886, -0.88285854366789351], [0.028401099412452169, 0.37609028661397614]], [[0.47363257943364689, 0.71411252309743167], [-0.61838871891183622, -0.37032278151459974]], [[-0.14392254834306062, -0.20082046543773879], [-0.5098074045434946, 0.70945906763976962]], [[-0.37217346496807591, -0.31503112223453655], [0.13223679724989523, 0.33987941474938621]]])
62636          arg1=Data(0.822392766782,self.functionspace)
62637