# Diff of /trunk/escriptcore/test/python/run_symbolic.py

revision 3507 by caltinay, Wed May 11 06:04:52 2011 UTC revision 3509 by caltinay, Fri May 13 06:01:52 2011 UTC
# Line 34  __author__="Cihan Altinay" Line 34  __author__="Cihan Altinay"
34
35  from esys.escript import *  from esys.escript import *
36  import unittest  import unittest
37    import numpy
38
39  class SymbolicTestCase(unittest.TestCase):  class SymbolicTestCase(unittest.TestCase):
40
# Line 66  class SymbolicTestCase(unittest.TestCase Line 67  class SymbolicTestCase(unittest.TestCase
67          self.assertEqual(e.evaluate(), (4,8,16,32), "wrong result after subs()")          self.assertEqual(e.evaluate(), (4,8,16,32), "wrong result after subs()")
68          self.assertEqual(e(x=3), (9,27,81,243), "wrong result after __call__")          self.assertEqual(e(x=3), (9,27,81,243), "wrong result after __call__")
69
70          xx=RandomData((4,), FunctionSpace())          xx=RandomData((), FunctionSpace())
71          ref=[d.toListOfTuples() for d in (xx**2, xx**3, xx**4, xx**5)]          ref=[d.toListOfTuples() for d in (xx**2, xx**3, xx**4, xx**5)]
72          res=e(x=xx)          res=e(x=xx)
73          for d in res:          for d in res:
# Line 74  class SymbolicTestCase(unittest.TestCase Line 75  class SymbolicTestCase(unittest.TestCase
75          res=[x.toListOfTuples() for x in res]          res=[x.toListOfTuples() for x in res]
76          self.assertEqual(res, ref, "wrong result after substitution with Data object")          self.assertEqual(res, ref, "wrong result after substitution with Data object")
77
78            x=Symbol('x', (3, 2))
79            e=Evaluator(x**2, x**3, x**4, x**5)
80            xx=numpy.array([[8.1535333292557866, -8.5134220382048156], [4.693054181874059, 4.6853479302119148], [-1.4382727700106699, 8.2817155001503657]])
81            ref=[d.tolist() for d in (xx**2, xx**3, xx**4, xx**5)]
82            res=e(x=xx)
83            for d in res:
84                self.assertTrue(isinstance(d, numpy.ndarray), "substituted expression not a numpy array object")
85            res=[x.tolist() for x in res]
86            self.assertEqual(res, ref, "wrong result after substitution with Data object")
87
88      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
89      def test_wherePositive_Symbol(self):      def test_acos_Symbol_rank0(self):
90          x=Symbol('x', (4,4))          shape=()
91          y=wherePositive(x)          x=Symbol('x', shape)
92            y=acos(x)
93          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
94          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array(0.55694769941)
95          ref=wherePositive(xx)          ref=acos(xx)
96          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
97          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
98      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
99      def test_whereNonPositive_Symbol(self):      def test_acos_Symbol_rank1(self):
100          x=Symbol('x', (4,4))          shape=(3,)
101          y=whereNonPositive(x)          x=Symbol('x', shape)
102            y=acos(x)
103          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
104          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([-0.53633846123112905, 0.53682157904894656, 0.11878120270719861])
105          ref=whereNonPositive(xx)          ref=acos(xx)
106          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
107          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
108      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
109      def test_whereNegative_Symbol(self):      def test_acos_Symbol_rank2(self):
110          x=Symbol('x', (4,4))          shape=(3, 4)
111          y=whereNegative(x)          x=Symbol('x', shape)
112            y=acos(x)
113          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
114          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([[0.67577608048465754, 0.07800716285058984, -0.16443675856054507, -0.67132575616485002], [-0.65356903053899429, 0.32886318669623171, 0.011020511030880309, 0.37396682728488639], [0.85528109715063438, -0.11934424131387367, -0.089767400684405807, -0.57066330844968283]])
115          ref=whereNegative(xx)          ref=acos(xx)
116          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
117          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
118      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
119      def test_whereNonNegative_Symbol(self):      def test_acos_Symbol_rank3(self):
120          x=Symbol('x', (4,4))          shape=(2, 6, 6)
121          y=whereNonNegative(x)          x=Symbol('x', shape)
122            y=acos(x)
123          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
124          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([[[0.9313657632740111, -0.40674411662398446, 0.35697889797942128, -0.55238961213168292, 0.76785928954568572, 0.80164039595385228], [0.35909861327661985, 0.61674015087497858, -0.65622190019869753, 0.15627562708868603, 0.22550716904389478, -0.76426850677068914], [0.5925427702360575, -0.64497718908198709, 0.76816294784734196, 0.60269869559378386, 0.68435671345845606, -0.3656171096895815], [-0.59229131361446496, 0.47353373321571635, 0.59059077781837788, 0.8378155484161991, 0.59176696546179763, -0.06129932284830919], [-0.081755352642232326, -0.58471182924369747, 0.23938657341376857, -0.85285652041848059, -0.0012545013305105268, -0.41293265942026491], [-0.8168372433840394, 0.57932447785014052, 0.10042331110295577, 0.51823220783972279, -0.81222829957011999, -0.94597269081279967]], [[-0.7150575739212377, -0.26482534317871909, 0.51494366836363148, 0.81123450331678049, -0.18724464922208273, 0.063503788938006567], [-0.88782406414650517, -0.14521068788828195, -0.57232936829795023, 0.91365376025041312, -0.026689196686216166, -0.091287559982732303], [-0.27348100016683596, 0.0083484167230349904, -0.53336876486434304, -0.99147429203598603, -0.26579316990995094, -0.26745311079676837], [0.76039705457894491, 0.15080987880856389, 0.9247065970239412, 0.34414637816754179, -0.075242536748050926, 0.13491928375352358], [0.39270839076090658, -0.085532854929213142, -0.96754698615620671, 0.78304433210534752, -0.49442641969528323, 0.33843207063092362], [0.16217395896732856, -0.74679431675542851, 0.57086399218504447, 0.093039384070887632, -0.11151151831231476, -0.2526930027011256]]])
125          ref=whereNonNegative(xx)          ref=acos(xx)
126          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
127          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
128      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
129      def test_whereZero_Symbol(self):      def test_acos_Symbol_rank4(self):
130          x=Symbol('x', (4,4))          shape=(6, 2, 5, 6)
131          y=whereZero(x)          x=Symbol('x', shape)
132            y=acos(x)
133          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
134          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([[[[-0.064708754139531921, -0.73559921606835155, -0.70157527113756535, -0.94456001168046844, 0.82188741565923285, 0.86794126322064646], [0.28325684687064157, 0.85497798548366633, 0.76615936288457132, -0.38030084497396821, -0.53065916475226071, 0.98381539415372754], [0.40359846688307099, -0.55281122961131235, -0.0847090329181166, 0.63692624394584496, 0.75398757536467564, -0.86620499736235024], [-0.53871563824165802, -0.69027078751922644, -0.24449937422231094, 0.7783424625371318, -0.87293363996126794, 0.72870128357511388], [0.43243748108387914, 0.92712034558248724, 0.080589265921705122, -0.34394914193921644, 0.34773586884274477, -0.28526864899985438]], [[-0.46610173857827553, -0.33224957920873632, -0.74725023139674662, -0.29757403464740495, 0.22262497965038297, -0.81641444600781821], [0.19981528664629344, -0.27794089147849177, 0.84267598447642977, -0.35591122372534811, 0.32837181371428725, 0.28104492075186016], [-0.12169539904522941, -0.98384081047537419, 0.34724093835256165, 0.98018687639402491, 0.48085935034449245, -0.62248241337628363], [0.19940725910496204, 0.24068196182201684, -0.57039424480355128, 0.09289337573717904, 0.72858497687222457, 0.98634707937820942], [0.073856619433472881, -0.6576861186056937, -0.29115904034457385, -0.69112405331866533, -0.68474177915021595, 0.37594640431519832]]], [[[-0.60631818994564934, -0.70707096766104671, -0.67958437683362227, -0.0990213122025978, 0.80435106243326304, 0.28786900286439709], [0.81582897941691446, -0.36031859159721091, -0.051248444161419382, -0.27042375526759943, -0.76283426750157846, -0.44522213282051282], [-0.47250753536037005, -0.83577160977741083, -0.35728207401263878, 0.93310986249062156, 0.6446868224119866, -0.93137366300821478], [0.049318144349842274, -0.36973458032661677, -0.46074047632495185, 0.19880898462779251, -0.04880771599339373, -0.55035266399904859], [0.39330581557947331, 0.38048344050621541, -0.7457978014019675, -0.49203066534202167, 0.87427919906431328, -0.63828157422283627]], [[0.78270472523854973, -0.37009878291546494, 0.30778101202707764, -0.70764173889612048, 0.63422949946870899, 0.13963462739941379], [0.68630466723521288, 0.08937996954699412, 0.37808906494803596, -0.92951342399750603, -0.92917280809213998, -0.39329720114756039], [0.010126343090714585, 0.1461222883387816, 0.90033433517952188, -0.31276767558680008, -0.71696626791201434, -0.042848248398834832], [-0.11157727500402403, -0.058036640460259692, 0.64435939172110146, 0.85159092672380088, -0.60789893864261968, -0.039239270692941197], [-0.18149345989893129, 0.13803996589345968, -0.63937531960275895, 0.95251304988424823, 0.22103051158874165, -0.83155511845832653]]], [[[-0.57487187099414361, 0.45572069581400987, -0.98428935271994211, -0.10446112094523374, -0.43497926783287633, 0.26052071610657168], [-0.59317511421833635, 0.30047543388900499, -0.50465388202340256, 0.36897089774595671, -0.2007155167961796, 0.22154208292514999], [-0.026026056899360883, 0.35046459556671183, 0.47518675958606771, -0.34084307934750879, 0.25943702287844217, -0.53019939943570149], [0.029702643144055241, 0.7355331276766599, 0.062845141749106492, -0.98668866192868543, -0.87514996061886019, 0.36240085609744943], [-0.3234572494978678, 0.28957587630075632, 0.8651585504391881, -0.4296693063950181, 0.89116483880043607, -0.67230623244259657]], [[0.2757384742069493, -0.75381011859838698, 0.96728718841346351, 0.47660223852923922, 0.069404033394140363, -0.98685001725030563], [0.44134991723531747, 0.2711146869889085, -0.7593193707357806, 0.10911791111620772, -0.4196712117689203, -0.19254282935510791], [0.35383165941236472, 0.3514383544882016, -0.16772213248081402, 0.73403156927611435, 0.5234094303937078, -0.23635244890479279], [0.42061280322909389, 0.72630088399151416, 0.71235083497718854, -0.92004289712623843, 0.038867268705457647, 0.96358885393015248], [-0.54631689351505108, -0.52307316181647479, 0.91953423663449474, -0.3952978682348669, 0.22203680521328439, -0.87947426291625219]]], [[[0.78462325828848822, -0.44279892135623777, -0.71883097374491567, 0.567218657053008, 0.61987081077960227, -0.034839420943603594], [-0.95641682874484313, -0.12712960221303082, -0.34914644315405585, -0.70895075849145628, -0.87574894432303529, 0.28497814300863245], [0.34033888818640112, -0.90004052570734383, -0.82873031190712387, -0.24284033554730522, -0.2080914693918976, -0.49911255262704701], [0.25956371768753228, -0.56506863762653547, 0.56753996932009598, 0.6459628765775105, -0.095636204119813772, 0.21934546148163769], [-0.53380256026155548, 0.40920723964375449, -0.085509697980793442, 0.1304396986042351, -0.062475922490457192, -0.51459786817443764]], [[-0.16239265789770685, 0.61288698052580903, -0.67993454328356662, 0.10691292187121682, -0.25284771202749057, -0.12872847415455002], [0.33937516357413267, 0.15083744639512942, 0.51107474742225811, -0.80963747190897384, -0.51981487235535662, -0.22023770251583619], [-0.34351401950554328, 0.98590893809858304, -0.94456180496635866, 0.20114931486980514, 0.070680370827551853, 0.89059416302654992], [-0.21755850677804101, 0.60431185893140715, 0.65902495075700851, -0.33036955266005341, 0.42844917396376037, 0.97548212040787097], [0.42460971554580196, -0.95332936805859458, -0.79294335701974439, -0.14176609968815201, 0.75325439881615841, -0.61586098647280063]]], [[[-0.082962948619836885, -0.76042806862539503, -0.54298920578190302, 0.58870432195101308, -0.11889616065870445, -0.7671929382742364], [-0.29061106430878691, -0.062746932465737482, 0.88938964124995845, 0.1291179782434615, -0.16113842269907042, 0.60167403688255794], [0.88153757978655256, 0.95380390835603679, 0.39611349730406675, -0.90357040886924711, 0.29832090476065831, -0.30928913560676619], [0.021113087967228106, 0.030981198913568875, 0.19928262277138131, -0.21342097071903421, -0.56874341164219433, -0.46707700574127742], [-0.24334589256908656, 0.26358329172884609, 0.4046098356504102, -0.73643777971554636, 0.75598498026257399, 0.79566653177142643]], [[0.72909445613439083, 0.13593149452441189, 0.66004700000051097, -0.083047233175469914, 0.50666177905736398, 0.93117786023335447], [-0.75784584461656768, 0.16289902459293759, 0.91805040903515267, 0.68820733797706013, 0.78592602149417234, 0.44285962753031516], [-0.48635447120246433, -0.33268515380643215, 0.042048147515149514, 0.81809651322389043, -0.01964434907991941, -0.082595319016289581], [-0.76984077784536997, -0.87204448702165327, -0.46943899190174476, -0.10745628934530238, 0.96821000494880272, -0.97461576289427332], [-0.2928182654525826, -0.67585286855633075, -0.73400239578659932, 0.063945584473272143, 0.78083148588640405, -0.97776188060042135]]], [[[-0.85370008131189179, -0.88596149707307625, -0.38578825926935134, 0.1423097916097571, -0.7920940968241641, -0.24076053729531499], [-0.67058703564536581, -0.56753519562219856, -0.96177795826834678, 0.58077443388672378, 0.11660581695260408, 0.64998572081357442], [-0.73507260850923517, 0.084443554494957773, -0.69788262386331645, -0.4909273583490239, 0.54054401129588503, 0.12667369975473064], [-0.63556204427779828, 0.58850548865867203, -0.34921596045412495, -0.82791492927457311, 0.28288758246669787, -0.5894151508813803], [0.15051017235895547, 0.89611376012410182, -0.44293884012542906, 0.8194222176123227, 0.89131891180279399, -0.13977699802976695]], [[0.28020496915438731, -0.072911030157432943, -0.71541137937293331, 0.73186002562893293, -0.47588305673008779, -0.070402845902211908], [0.59986490378907664, 0.30273470286021187, 0.012573891286977945, 0.86861233854357178, 0.94475886021299771, -0.91957561344982741], [0.60898116826024262, 0.37392704955865264, -0.69723349582501259, 0.3969256480754153, -0.26101683007901322, -0.58250737590982093], [-0.16087132133606774, -0.3406653786636169, 0.36246032708624787, -0.81933654999909256, 0.084163188527405008, -0.42784618464839252], [-0.75858124079811939, -0.084721911139000294, 0.39464765435449434, -0.2604255522559944, -0.48544297637042155, 0.36682125855259295]]]])
135          ref=whereZero(xx)          ref=acos(xx)
136          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
137          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
138      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
139      def test_whereNonZero_Symbol(self):      def test_asin_Symbol_rank0(self):
140          x=Symbol('x', (4,4))          shape=()
141          y=whereNonZero(x)          x=Symbol('x', shape)
142            y=asin(x)
143          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
144          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array(0.0575134837697)
145          ref=whereNonZero(xx)          ref=asin(xx)
146          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
147          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
148      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
149      def test_log10_Symbol(self):      def test_asin_Symbol_rank1(self):
150          x=Symbol('x', (4,4))          shape=(1,)
151          y=log10(x)          x=Symbol('x', shape)
152            y=asin(x)
153          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
154          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([-0.50647242625757549])
155          ref=log10(xx)          ref=asin(xx)
156          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
157          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
158      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
159      def test_inverse_Symbol(self):      def test_asin_Symbol_rank2(self):
160          x=Symbol('x', (4,4))          shape=(5, 2)
161          y=inverse(x)          x=Symbol('x', shape)
162          #self.assertTrue(isinstance(y, Symbol), "wrong type of result")          y=asin(x)
163          xx=RandomData((4,4), FunctionSpace())          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
164          ref=inverse(xx)          xx=numpy.array([[-0.29670857317092625, 0.63804453793814764], [0.48767335686599345, 0.97209356077358477], [-0.84553487069146738, 0.46559340116154413], [-0.55117444618389166, 0.57822612990001065], [0.11380124743773168, 0.89935947426125273]])
165            ref=asin(xx)
166          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
167          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
168      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
169      def test_minval_Symbol(self):      def test_asin_Symbol_rank3(self):
170          x=Symbol('x', (4,4))          shape=(3, 5, 6)
171          y=minval(x)          x=Symbol('x', shape)
172          #self.assertTrue(isinstance(y, Symbol), "wrong type of result")          y=asin(x)
173          xx=RandomData((4,4), FunctionSpace())          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
174          ref=minval(xx)          xx=numpy.array([[[-0.47028790811437959, -0.67288926285964501, 0.97621331590660754, 0.21080115129940458, -0.058725158935201138, -0.12867500241463348], [-0.82314592268211251, -0.81284933909801427, -0.31172885368049696, 0.35793510254050198, 0.55287136711044504, -0.81581594412479741], [-0.45878474609193454, 0.82188306473152939, 0.85258902969642736, -0.55745891613209686, -0.58696367232340707, -0.042456923438679794], [0.23144761765939736, -0.39046735708031766, 0.5342082703713249, 0.25575967993313431, 0.65749198255932484, 0.33823379566383416], [-0.94332529203841786, 0.76437707294690571, 0.62792792956278842, 0.6656957067017728, -0.67515607800948252, 0.66566715135148957]], [[0.22159337905818366, 0.47800559441378043, 0.15805741197512169, 0.12466985543857478, -0.15458378757689917, 0.78548241626645532], [-0.15211867625534969, -0.833134335215725, -0.10249253379622658, -0.22244517192607938, -0.64761985729970428, -0.43102514127588609], [0.37826592852159435, -0.12320235474344643, 0.3078284607197026, 0.9157107371171691, -0.87334836579884079, -0.89069819903225222], [0.8124932862038492, -0.9890642170106696, -0.97009862281898407, 0.060566184331444894, 0.5212078018908386, 0.46908773498427103], [0.99751368490203762, -0.2843508569507307, 0.70771983445054953, 0.11579630583525224, 0.2256672039692118, -0.42800377997301808]], [[-0.22185993312325847, -0.058173565206135036, -0.21845287189069684, 0.85273361910061052, -0.8062853183893155, -0.53263580851901504], [-0.020949293252047196, -0.82555708666121452, 0.83618490890254593, -0.58092030179167842, -0.42690991922982491, 0.17865448104121873], [-0.93198906114988112, 0.30025827204734301, -0.71653359700444552, -0.88277017764434995, -0.11453021763345883, -0.95521487810907746], [0.70679375207759709, 0.22931000298493487, -0.71307530825859278, -0.75290143362324846, -0.50792461124468935, 0.89477338965011355], [0.97425509819645995, 0.99994309138290616, -0.32523531170615105, 0.45595452562134553, 0.80300272640636039, -0.12618312092254191]]])
175            ref=asin(xx)
176          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
177          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
178      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
179      def test_maxval_Symbol(self):      def test_asin_Symbol_rank4(self):
180          x=Symbol('x', (4,4))          shape=(3, 4, 1, 6)
181          y=maxval(x)          x=Symbol('x', shape)
182          #self.assertTrue(isinstance(y, Symbol), "wrong type of result")          y=asin(x)
183          xx=RandomData((4,4), FunctionSpace())          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
184          ref=maxval(xx)          xx=numpy.array([[[[0.60754245302975196, 0.0020029538225689869, -0.0010395919649250907, 0.90408717497401292, 0.44370970325368075, -0.93924804761780556]], [[0.55258112803035586, -0.18154804340853348, -0.11420892213135247, 0.44924033396119056, 0.21871439992683395, 0.17210031195721665]], [[0.48131748859705792, 0.027621989712713013, -0.36854954263574946, -0.42505925182162296, -0.5262966537838194, 0.38933183698937368]], [[0.085065645833357184, 0.018866995883265458, -0.52104897754649682, -0.42249458240860549, 0.65596139127887731, 0.54320238781336538]]], [[[-0.24978179403377943, -0.0042891207293693778, -0.5263702648433175, -0.79472598747417078, 0.46955460643586333, 0.5521518621690058]], [[-0.18927910709256479, -0.8252199103801845, -0.18200902838369282, -0.13219770825787314, 0.6216217701794875, 0.41865802701864485]], [[-0.93104757170780905, 0.38246348998805724, -0.94918328774059435, -0.69364592568173311, 0.031538853296116276, 0.53003255066472099]], [[-0.26565985791445135, 0.71685003200363639, -0.38673211582607059, -0.35620295341513519, -0.25174761583653038, -0.25488397111953809]]], [[[0.5707598556565745, -0.51980800583047193, 0.95833173633908419, -0.10620431572514, -0.71472913634412705, 0.056415415984334194]], [[0.81548250250827858, -0.37820795077677216, 0.91282512008585615, -0.32452791600741371, 0.86275504934451663, 0.39544492179522983]], [[-0.73317260611219859, 0.087866043339142275, 0.39827339727617717, -0.78918128795391573, 0.60690138527255111, 0.8813774132340757]], [[0.39353650858162026, -0.41208093256228295, 0.19084716076118813, -0.6764318551688151, -0.79079465780889735, 0.47735963112385793]]]])
185            ref=asin(xx)
186          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
187          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
188      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
189      def test_trace_Symbol(self):      def test_atan_Symbol_rank0(self):
190          x=Symbol('x', (4,4))          shape=()
191          y=trace(x)          x=Symbol('x', shape)
192            y=atan(x)
193          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
194          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array(-0.383941715906)
195          ref=trace(xx)          ref=atan(xx)
196          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
197          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
198      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
199      def test_transpose_Symbol(self):      def test_atan_Symbol_rank1(self):
200          x=Symbol('x', (4,4))          shape=(2,)
201          y=transpose(x)          x=Symbol('x', shape)
202            y=atan(x)
203          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
204          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([0.80874042715020056, -0.83316096335312162])
205          ref=transpose(xx)          ref=atan(xx)
206          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
207          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
208      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
209      def test_symmetric_Symbol(self):      def test_atan_Symbol_rank2(self):
210          x=Symbol('x', (4,4))          shape=(5, 5)
211          y=symmetric(x)          x=Symbol('x', shape)
212            y=atan(x)
213          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
214          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([[-0.079112216435460514, -0.56135418088072275, -0.98997166702802009, 0.12687703431002162, -0.74812454122617811], [0.45437217517511042, -0.72634689075251146, 0.11686865863919071, 0.87319504291582639, -0.64728444258695239], [-0.5465508668816097, 0.28385216545465042, 0.90163612340949695, 0.28769716630093001, 0.7151574765683828], [0.12040670401760822, 0.87755420667364925, -0.58756635491511244, -0.51802506589615804, 0.07524774950265134], [-0.66251111019792885, 0.099286209585522478, -0.066672010999616393, 0.078435265909126972, 0.29273683198245948]])
215          ref=symmetric(xx)          ref=atan(xx)
216          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
217          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
218      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
219      def test_nonsymmetric_Symbol(self):      def test_atan_Symbol_rank3(self):
220          x=Symbol('x', (4,4))          shape=(5, 5, 5)
221          y=nonsymmetric(x)          x=Symbol('x', shape)
222            y=atan(x)
223          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
224          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([[[-0.7810489680594741, 0.5552019863124027, -0.029946184662261066, 0.30291126565592763, 0.5249851684774689], [-0.054462102690683301, -0.42264427341942179, -0.28983002681455949, -0.48946375267729181, -0.47515812328607132], [-0.14135060918394249, 0.97348522256104486, -0.65635931487805932, 0.57301837593514704, -0.13559682757526548], [-0.29588458538485773, -0.21998350000962907, 0.9741962127512056, 0.36218843934105327, -0.38367588529499863], [-0.42821304499014512, 0.14867816552159785, -0.71493711508465974, 0.4375087740046868, 0.18590259088310268]], [[-0.5363684335786536, 0.64997868114927382, -0.33809325301334692, 0.7964410362123262, 0.25511970789555272], [0.63827161703669488, 0.86223851457745226, -0.15124256163676364, -0.23662128216067413, 0.73397028503445516], [-0.53284001619353116, -0.48784122202068425, -0.79026154186886721, 0.77461269317909487, -0.34022973824985048], [-0.38195064973560422, -0.07960781190047328, -0.76715677631843482, 0.44274688064207934, -0.91397324522825163], [0.85779581350985779, -0.43547714098475132, 0.91373263970487484, 0.17536159769338866, 0.26165596551157067]], [[-0.24133765863933787, 0.29063991087783414, 0.96150148086902654, -0.38737715458583377, -0.95738410075803526], [-0.57226633393336623, -0.50391613096102228, 0.12806544558717059, 0.11059724085635758, -0.6736713744768803], [0.12785398606888032, -0.5583359569302675, -0.91223105336594057, 0.18209171734226048, -0.99134678119601638], [0.6572161225793367, -0.58581301679006037, -0.37664979384945285, 0.0049817918121464189, 0.53948450539362902], [0.28951217932079154, 0.38254473725466287, 0.26249893604105146, 0.31607406341650179, 0.0731927100558869]], [[0.6356798543535378, -0.24770797618152396, -0.15883892045337666, -0.12465087431274724, 0.5860009562613917], [0.23108907912032262, 0.50967854381078403, 0.29788609996921234, 0.41307108130883119, -0.32583243560707387], [-0.86701339774070152, 0.38726319749063842, -0.61036947407033293, -0.83447670132744189, 0.2873030303951869], [0.2684874348910955, -0.88065334332182998, -0.064031130226149813, 0.87565986485119662, 0.71738925725877856], [-0.15017771992385631, -0.2173456725113061, 0.77231967987340933, -0.28400203342249153, 0.63652600113529845]], [[0.61931761389139051, -0.28247923804128217, -0.27496168180244207, 0.30743872516996018, 0.30754833781327262], [-0.7638790632737178, 0.38353391770828726, -0.71000080673172539, 0.29148634126661332, 0.33769179410965733], [-0.2214781547530611, -0.91876985253622689, 0.82733732287887007, 0.9418632385911605, 0.12822315100992232], [-0.42496896058919686, -0.55825667787637201, -0.25768410110541162, 0.66699271110522473, -0.72665124823898641], [0.39744956771454976, 0.65708903533028784, 0.88733074166903725, -0.65551899434303107, 0.1095115874297361]]])
225          ref=nonsymmetric(xx)          ref=atan(xx)
226          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
227          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
228      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
229      def test_swapaxes_Symbol(self):      def test_atan_Symbol_rank4(self):
230          x=Symbol('x', (4,4))          shape=(4, 4, 4, 4)
231          y=swap_axes(x, 1, 0)          x=Symbol('x', shape)
232            y=atan(x)
233          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
234          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([[[[0.34290280603641876, 0.69646446447188781, 0.78069054812351668, 0.21858712199897146], [0.67727533027464304, -0.80913749509454247, -0.10091387266427465, 0.48823356525049033], [0.72950281233906322, -0.75275092775981745, -0.23025687639456427, 0.98630937020001364], [0.22048381230034075, -0.56325773464103124, -0.98404093715736773, -0.6603227181745861]], [[0.26720964685107695, -0.29688734916340653, 0.45778973101912568, 0.70779343177407861], [-0.16700766642895215, -0.89918590402964882, 0.93846435242113069, -0.70421641315837213], [0.70106555846625485, -0.67063373984830776, 0.097690941688788557, 0.37363083742477965], [-0.54073558982173897, 0.60401050434907466, -0.034380248692211568, -0.10009840642629508]], [[-0.93173877849625408, 0.73483665883853222, 0.49812450255321483, 0.47547609834926519], [-0.4393842944156785, 0.75850898434110303, -0.43663743950098732, 0.54782253427531358], [0.5957418588622363, 0.5514826566900799, -0.87412703674058534, 0.060940283526906169], [-0.2083145859536446, 0.47340840680272644, 0.56190125325497275, -0.89323288205981344]], [[-0.98040969588857441, 0.023271578196670806, 0.82196890435839953, -0.9492058529310583], [-0.43478154795007384, -0.56767172900814633, 0.88894259226539241, 0.43411899256269049], [-0.59349203356003133, 0.22881516887145503, 0.40495313991552617, -0.50816314697060028], [-0.42926446508946681, 0.75818660689180017, -0.57337917201880861, 0.18610543993694018]]], [[[-0.44205218436293703, -0.91396986956856718, 0.33070458898118238, 0.92053121423365369], [0.87512129930304927, -0.38815634648886599, -0.51960186519087959, -0.81646928843727862], [-0.0069590274621689208, 0.18423652421187731, 0.27673683073850208, 0.56438309300830514], [-0.30747248782598313, 0.50860848522667679, 0.77406849329254235, 0.31568125507772438]], [[0.97299829876791444, -0.77000328463917023, -0.47626224792262972, 0.9365782431569214], [0.069449334725619982, 0.55221537297070045, -0.52371624485381663, 0.13949257107767932], [0.047296828280015912, 0.31046447715832626, 0.37680974461551653, -0.28479671897599457], [0.24782204906012595, 0.96470934660089402, 0.14678066860249417, 0.87935976788242809]], [[-0.81492323304781666, 0.89144453451596917, 0.83595895804878029, -0.86001813567035623], [-0.25687184101193861, 0.44247760915117862, -0.57452237154653707, 0.3763521903203082], [-0.92905953689375487, -0.90723537828321499, -0.71619195743648145, 0.51626133194459767], [-0.39918795224757009, -0.55696174284968691, 0.55394434969834272, -0.42259280556182022]], [[-0.15539737673540976, -0.40554258409460364, 0.23013989197248153, 0.1168560173575659], [0.34958079388693819, -0.35168607892267945, 0.33077677727366828, 0.98687850782252351], [-0.36573245874861726, -0.16431535929758612, 0.63685426927789868, -0.98746457222630246], [-0.54455708610335618, 0.8790136994139528, 0.95983747174351097, -0.16664508673408474]]], [[[0.70949138842660786, 0.8460459146293251, 0.39547969624603185, -0.43523392965119645], [0.84435168753095691, -0.72423826132080493, 0.56193433624735034, -0.69908640073810213], [0.53424563354995169, -0.85757408218588682, 0.050708534417594153, 0.37269424463241507], [0.82535813500485555, -0.20691726378737707, -0.38562837362993485, 0.35109978245305262]], [[-0.15828242888380473, 0.49588086313246382, 0.56632617924782314, 0.48635215082879202], [-0.63520820786804566, 0.75061021408733319, -0.21598266412258504, 0.32098579387697224], [0.35042805928490028, 0.16501673429542829, 0.137909120299329, 0.000502782106896138], [-0.32210165945258251, 0.96354731581061714, 0.39471874848160327, 0.097829947158583508]], [[-0.13558904380036552, -0.87318619508469997, 0.11366467746216702, -0.23911737724129245], [0.11563088071511762, -0.62086516542864834, -0.3044364174938341, -0.56970012691056482], [-0.46412400101530471, -0.46184353035515469, -0.36840335475957842, 0.57198472117774779], [0.71869832764273656, -0.81441062900696282, -0.47043569346088332, 0.025043378323925669]], [[0.60685569038938092, -0.85973354707404348, -0.4323265155669116, -0.069738938025623698], [-0.060465227564384216, -0.74330706265106561, -0.27173969292114242, -0.30969477549310565], [0.50769978883517508, 0.12890604649613668, -0.34909171672412564, 0.7037728297587782], [-0.97044434390817602, 0.61877466663478731, -0.46106324150552824, 0.93494253500623015]]], [[[0.70116654585703819, 0.31107126083386683, 0.39109997053245138, 0.85688902263767797], [0.16055927662888214, -0.091475901248709635, -0.82352125806261656, 0.84206773069166352], [0.081929697236698962, -0.19517239748274218, -0.77851243029310946, 0.035013746609340979], [-0.48986778698408351, 0.30978387639869998, 0.52221943943699478, 0.85802503253047657]], [[-0.47989536918429865, -0.025649858245310853, 0.26378322896511186, -0.47856318945675835], [-0.89763767419511487, -0.87029897447725135, -0.57894984485733647, 0.66201559604171889], [0.24719610372353951, -0.74322838171494543, -0.67958591051471373, -0.3380428200228256], [0.89575150156783834, 0.27540529872701236, 0.030582456543022385, 0.95986233741527105]], [[-0.39503968394118139, -0.44488340444536423, 0.41498558099787286, -0.69705272712749178], [-0.56346116187082118, 0.70070052358524926, -0.95989490291309898, 0.10427933410450585], [-0.011164169307204208, 0.13727549444241083, -0.9876013203460603, 0.14226490447114903], [0.69258371278150532, 0.74204067560739939, 0.24765690586016609, 0.054170936301846773]], [[-0.86992278032451065, -0.66105396032294328, 0.34985328373613478, -0.96177321496092749], [-0.68464372068386314, -0.34156557863368153, 0.93273302673720782, 0.63423743331817151], [-0.018906896355298963, -0.81694280732444713, -0.84063712400943591, 0.74767667098991186], [0.75661214612319672, 0.0076011111597975578, 0.35173358659268072, -0.14798134369744642]]]])
235          ref=swap_axes(xx, 1, 0)          ref=atan(xx)
236          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
237          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
238      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
239      def test_sin_Symbol(self):      def test_abs_Symbol_rank0(self):
240          x=Symbol('x', (4,4))          shape=()
241          y=sin(x)          x=Symbol('x', shape)
242            y=abs(x)
243          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
244          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array(-0.936638695416)
245          ref=sin(xx)          ref=abs(xx)
246          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
247          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
248      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
249      def test_cos_Symbol(self):      def test_abs_Symbol_rank1(self):
250          x=Symbol('x', (4,4))          shape=(6,)
251          y=cos(x)          x=Symbol('x', shape)
252            y=abs(x)
253          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
254          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([-0.10402404326638925, 0.43431089469982043, -0.88656246765036517, 0.78015226997382481, -0.48119786271284326, 0.87903152982484589])
255          ref=cos(xx)          ref=abs(xx)
256          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
257          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
258      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
259      def test_tan_Symbol(self):      def test_abs_Symbol_rank2(self):
260          x=Symbol('x', (4,4))          shape=(4, 6)
261          y=tan(x)          x=Symbol('x', shape)
262            y=abs(x)
263          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
264          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([[0.35757467037387247, 0.082875543911905103, 0.95704889792159387, 0.42001928160163637, 0.9102058492319125, -0.10810567325848774], [-0.76515448275148379, -0.78147093363217879, -0.26406184143386247, 0.5314996485347363, -0.68786423269650099, 0.86250994583107832], [0.92055232817955823, -0.15341711317018958, 0.51568909320822631, 0.79238263233117023, 0.76039428660524577, -0.055104357465338039], [0.41099105970210603, 0.62248024876662678, -0.95709511862746277, 0.65868935924305494, -0.26931899696276052, -0.2287950913828749]])
265          ref=tan(xx)          ref=abs(xx)
266          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
267          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
268      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
269      def test_asin_Symbol(self):      def test_abs_Symbol_rank3(self):
270          x=Symbol('x', (4,4))          shape=(4, 6, 6)
271          y=asin(x)          x=Symbol('x', shape)
272            y=abs(x)
273          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
274          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([[[0.16687811319839563, 0.54299078664115563, -0.44859887051141767, -0.36539313365759574, 0.11364230842239453, 0.16321925340359966], [-0.36980443860674472, -0.63476194136763242, -0.83542002728175824, 0.93285195312168701, 0.65908731574814472, -0.67952809917578127], [-0.029664914010988364, -0.95561520697709357, -0.18246903907234713, 0.6880283935374254, 0.12070943021486791, 0.54914931419178603], [0.47468489749239273, -0.21012802300669575, 0.15869063364706903, 0.70095090705105312, 0.29663297884087569, -0.75637449073484619], [-0.43627397831787285, -0.015536850556908677, -0.2296234579712968, 0.4641163149829628, 0.81312391891534253, 0.46512977062395455], [-0.16122995207006507, 0.75440868041803499, -0.39591670269469392, 0.87897990682742311, -0.97595680612329416, 0.73573146822620483]], [[-0.13719167703373003, 0.56891943091320751, -0.95000035969056973, -0.051760133482456894, -0.88585321610908307, -0.051342277588692919], [0.99387524132172311, 0.150518857247391, -0.37305933003083802, 0.79793673034751067, -0.46382618998729774, -0.93863503135386783], [-0.044812681991393877, 0.013506211093427201, 0.47535167551086555, -0.14128360013200325, 0.62660414350376969, 0.30960309269423525], [-0.61128005712938416, 0.80564896876309611, 0.033126283143377622, -0.9309776793461968, -0.18167197546321523, 0.19931433719610836], [-0.82371248009001707, 0.87350937923220839, 0.10503977382133023, 0.31798940985911162, 0.59756367957379597, 0.96888504544364329], [-0.84189568853140351, 0.49949575844295002, 0.035414980067912438, 0.46751617183236593, 0.97960728184344648, 0.3051770267877072]], [[0.011186270909940621, -0.49594829753641401, 0.34798857192314481, 0.66597807049492763, 0.82802260821709761, -0.089022712445967711], [-0.5045173022822298, 0.67317969500529173, -0.31247078187051547, 0.25257407307332302, 0.55678951668813137, 0.081463074745823816], [0.26225288799409507, -0.54917738110751402, -0.35277691617823681, 0.015773947805651112, -0.31417397986809892, 0.30088793620120535], [0.72706642452825099, 0.83765585155798394, 0.38196885350691856, 0.50578103170860245, 0.36437984656475098, -0.67990937496495096], [0.025863590416313142, 0.98484158367076424, -0.68077173548821412, -0.20633483575261513, 0.62406597224974125, 0.029715091461679277], [0.53275233286537937, 0.36342366127929937, 0.11783043788420788, -0.06294356076969998, 0.10708088040980868, -0.2363455025898602]], [[0.039485010982840407, -0.9416906243326979, 0.19581066259670843, 0.076049429409880798, -0.7503624056841145, 0.87563966990917041], [0.075589907868268913, 0.527376951790542, 0.19578775978398233, 0.78895886433340623, 0.77763985380279577, 0.68369606091106139], [0.019865716374145581, -0.83304929739695632, -0.2038498203924004, -0.30329770264770861, 0.053348091370216677, 0.038680635898133975], [0.12659163621232072, -0.35567113834080932, 0.51331908436933293, 0.049868109681104222, 0.059440668868496527, 0.013630733835422459], [-0.8811626588096082, -0.79776194490579933, -0.38022487040948283, -0.37069977694976308, -0.94642283550314144, -0.93151913587780077], [0.50469744053914489, -0.88316010812831069, -0.2380155880278112, 0.15296208048718274, -0.42598040676333415, 0.79141844651293614]]])
275          ref=asin(xx)          ref=abs(xx)
276          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
277          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
278      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
279      def test_acos_Symbol(self):      def test_abs_Symbol_rank4(self):
280          x=Symbol('x', (4,4))          shape=(6, 6, 5, 5)
281          y=acos(x)          x=Symbol('x', shape)
282            y=abs(x)
283          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
284          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([[[[0.11155439587814553, -0.83570825800181647, 0.30905030514979881, 0.77966492636336815, 0.26404641022085751], [-0.78229926947026951, 0.18762977691235516, 0.27333918575561245, -0.46241050954311347, -0.53404539813208407], [-0.26477783906220931, -0.81222588561243292, 0.13269649191105204, -0.99148433440819628, 0.77905481900143214], [0.75189561821816642, -0.82157143496939167, -0.20748203231996709, -0.56851347406041652, 0.34595348346978594], [-0.33327766198851227, 0.38076888005069298, -0.2491857642727231, 0.86536672327506836, -0.15365638877614529]], [[0.71781766785252277, 0.72274484687069607, -0.15306394943064738, 0.3851181635046268, 0.88489136587566364], [-0.32458179238391427, 0.064896648625430542, -0.67516803942101666, -0.68235420287123905, 0.38108333220582713], [0.059608395216784293, -0.98383574851351163, 0.96620584778505725, -0.96955706816508447, -0.13796490436629516], [-0.64807441921835696, -0.58753530643398388, -0.72112670475117269, -0.076599627863638275, -0.05775342310976761], [0.96928826504415344, -0.71007471356984597, 0.67246811827987374, -0.60624546777971133, 0.70906462276006454]], [[0.37287046718677197, 0.58393710492621431, -0.85960992649700074, 0.34695349763603422, -0.51977660036338813], [0.95701388826269129, 0.16455917175588697, -0.69037614159132343, -0.18148578025343176, -0.30196132656378571], [0.58144903657489988, 0.2415232720158722, 0.74027390839543705, 0.71462890827785475, 0.6676610498099389], [-0.71978165169761277, 0.034132904630896466, 0.98338950580498929, -0.306102050953305, -0.3201470692815378], [-0.88379257424943192, 0.85175651254295337, -0.21825369110250237, 0.091534924936035322, -0.16827865718241619]], [[0.79644320352421394, 0.67520688354088865, -0.40366709778546195, 0.11084678468284159, 0.35138227363814822], [-0.63409767599601752, -0.41064393499197127, -0.69051922437177327, -0.97745154345490382, 0.76716420250629258], [-0.65355347334526592, 0.31115768941016775, -0.67572834758979905, 0.24177191461339231, -0.78386558878039225], [0.4392589983516666, 0.51751483333749637, 0.87971361849524077, -0.26163594699629056, -0.046809400341840224], [-0.72485054471878652, 0.52228496166083915, 0.76362640526383796, -0.10680121620328387, 0.76139592584658033]], [[0.78891191960367069, -0.99046451394804635, 0.67907169695016711, -0.48995778771912368, 0.96161409884053373], [0.98894204310120615, 0.8382033879768287, 0.22783129159357363, 0.99565217113108417, -0.3767921520827533], [0.91518524971290827, 0.48506534016852632, -0.49391946004894804, -0.27291748331670074, 0.2411710885324263], [-0.19421205054481039, -0.40209519988593367, -0.25435880048864101, 0.11130794913914932, 0.36064831009719289], [-0.96959041972743676, -0.80681962979960531, 0.58498355440016536, -0.17282191076598075, 0.2720775620751108]], [[-0.064141955041188359, -0.92636788286952543, -0.97657921311880092, 0.8825769719690002, 0.27288469598563925], [-0.79755720954708953, 0.09910731493791225, 0.89226255730052739, 0.26343774636013628, 0.18946774159118451], [0.20617125991345153, 0.89861730140206286, -0.73359702586274378, 0.34856560687880633, 0.19789476253800165], [0.27809242051447325, -0.17698061361738415, -0.52801629703643616, -0.12627175440217342, -0.9674288044271675], [0.71894026082045426, -0.073177395911905974, 0.84255871295935747, 0.34772216028371772, 0.68837562160396337]]], [[[-0.93940162629695712, -0.13184934095481338, -0.082023144975795548, -0.98392411664856794, 0.10519714054270946], [0.20669285653341452, 0.012562757142757786, 0.086786348941598312, -0.15429507553745703, -0.022195611912304791], [-0.37277746865831984, -0.65970886814023411, -0.82342155342835288, 0.6710605688097846, 0.7398947085184624], [0.051249479898737071, -0.61725894243272661, 0.95537299945722975, 0.64876015390775099, 0.064675255626812422], [0.87665523709974735, 0.47891151708349677, 0.025448183947456959, -0.500625526357799, -0.016265143589796915]], [[-0.82567827052292619, 0.48705109431561189, 0.56623209245428008, -0.27262789112337549, 0.76533945900407385], [0.33076398653588912, 0.82198288460951963, 0.097871104727800473, -0.60112572012625676, 0.19625764091089559], [0.32629923629148783, -0.071119526152071622, 0.56563488682172736, 0.65807488316765195, -0.26161374616144051], [0.3179058485310895, -0.72053846649468412, -0.1408327640975684, 0.62837759196874887, 0.69932039229536458], [-0.93925059994551852, -0.83233906006645397, 0.13462727994321644, 0.7917261555541244, -0.73139563914577033]], [[-0.036667105205934414, -0.24485816495886037, 0.323591522358327, -0.42057666267403904, 0.36170928669435298], [-0.11426060468884969, 0.28498204370689417, -0.97361383664143064, 0.9891531617668694, 0.34613261892069147], [-0.7410219449662272, 0.95905342580589581, -0.8023485771424439, -0.83711312282877115, 0.33255891977311269], [0.21429275226149236, -0.076230265785005802, 0.80553010716144313, -0.7972117365345015, 0.72127993942291746], [0.7329797914533791, 0.93978511021074462, -0.64321821751529185, 0.71921929476926372, 0.46528286829401666]], [[0.62488165444821653, -0.86249058477051754, 0.5569889656598277, -0.33084046431747516, -0.95635509922449713], [0.16246144925659967, 0.37919184042494036, 0.72440099352870302, -0.62565231545564659, -0.77118423233855737], [-0.16425133939541015, -0.25305047332165032, -0.042665024559153997, -0.55166935405955098, 0.099830832300739969], [-0.050339874360346037, 0.73574802092865532, -0.38003839362341729, -0.24417219552637381, -0.26652744212767621], [-0.72460168831431471, -0.8356865635378885, -0.67689524519813959, -0.63771840342494546, -0.44081553006252339]], [[0.59329645642091156, -0.051284546931833264, 0.82949093277626917, 0.7865045429440396, -0.57124995783317001], [0.86378782259213072, 0.80311564006903025, -0.8125803071418094, -0.24799334622872427, 0.64350444861130707], [-0.18942415001886448, -0.14291798817250667, 0.78680444076579148, 0.63355219601209156, 0.5433503280958436], [-0.61707114500717042, -0.13758092287722956, -0.038024199136998282, 0.98487066682831581, -0.70355036409082361], [0.9663298276402168, -0.2451975041518657, -0.10868067792536329, 0.15116933228372265, 0.31853638515230354]], [[-0.72867679693724274, 0.49552278261820915, -0.72803684494142562, 0.94830413868916552, 0.78778343010397922], [0.18554288280176556, -0.9246160805077992, 0.034154931637147001, 0.4344753420723344, -0.2038526850431357], [0.39359589409729479, -0.063356484751313946, -0.31639284190214312, -0.24344656107623797, 0.36415044972719457], [-0.45040897053883833, -0.87350531592867098, -0.67358247320439713, -0.41033040844650093, -0.56257279093729728], [-0.80422424723407193, -0.0090599864626925708, 0.88207206038608144, 0.34156498313420514, -0.097163315272309037]]], [[[0.97558325933899193, 0.43221781230685385, 0.21411657999992784, 0.080877851199139927, 0.083332911605763726], [0.33655998518017749, 9.4368478730233463e-05, -0.7923148830541491, -0.9523743826801867, -0.004412246630205896], [-0.93522995380799667, 0.97916992621537235, 0.36129372750421251, -0.59524381888832911, 0.53177016596491922], [-0.091562874557433283, 0.045976046969228079, -0.63440739613803676, -0.99079989775937194, 0.88714351219088661], [0.038960248915277385, -0.96831104755010222, 0.36598136773069645, -0.35295025419757464, 0.066349388885381]], [[-0.62394382294521922, -0.3120931071802755, -0.75710435793940523, -0.72965346575687806, 0.92289924433307302], [0.26881025745885445, 0.29935294441137983, -0.8165795865103298, 0.77946640447477056, -0.25358442284966931], [-0.62677497311873287, 0.81063680792217818, 0.84693996584904108, 0.8119009956255292, -0.64256179760276533], [0.077635977888019347, 0.19147782709154493, 0.91683247998220074, 0.3070938354630588, -0.65329683027926699], [-0.83748781889754009, -0.026929628568679531, -0.4723086105397456, 0.202753267700994, 0.3354821157412835]], [[-0.42031885442838113, 0.99806494754168074, -0.84405566711802482, -0.50347788389663606, -0.023114059511474716], [0.40662782363948091, 0.16519451399288321, -0.78053342208824872, 0.51544979615841835, -0.93363047022089574], [-0.21018059776256215, 0.9378031231400632, 0.97212584754565179, -0.3829128312010488, 0.86164234112137028], [-0.17609725777221152, -0.8031747786175083, -0.15230384509801187, 0.73825247132103256, 0.48362846132796333], [-0.80110314626997936, -0.22465042262737067, 0.90078274911658585, 0.51162426586649246, 0.035250192692244164]], [[-0.30031859895833257, 0.45492436720548834, 0.06005701683449538, -0.59819261476378038, 0.60925100565195933], [0.0042712686339025918, -0.29033798850640391, 0.21568603379361995, -0.58277546722149576, 0.41137519819422508], [-0.33939942167919357, -0.39765697380688625, 0.993280129651682, -0.55234831402540085, 0.13689676234525572], [-0.022857387280939889, 0.25679667988579569, 0.93176009998400833, -0.87452401046678507, 0.93039777361436871], [-0.0059152252302656638, 0.75245671320555996, 0.70199619094002741, 0.29082132325293597, 0.54292331343917333]], [[-0.81151614401630656, 0.73898374713194559, -0.14068229774281482, 0.78441318473682031, 0.85328100133352458], [0.25692622372279916, 0.21926479592441317, -0.030429719853546144, 0.84558103223647008, -0.12273082670847235], [0.30158849869521709, -0.46253587327766077, -0.44521480354402265, -0.081114137898851357, 0.19859218275139301], [-0.50135444795012152, -0.017260374572007242, 0.017994060723186767, -0.35391424719053965, 0.34674509011236143], [-0.72103128263178307, -0.60104219232750489, -0.15639018611991684, 0.071396531733930901, 0.78617558653068631]], [[0.89898903975917444, -0.5972524188858197, -0.3461296210622602, -0.22163882038237892, 0.30843336077972849], [-0.61751199350016606, -0.028295236292635861, 0.6499561032608181, -0.59336516737485634, 0.67085611290509406], [-0.007269193809439356, 0.77679299608869523, -0.27759381936568817, -0.26218156377823854, -0.34600795181261801], [0.52388309597523186, -0.83468013794825247, -0.88748787477314717, 0.1734178750408657, 0.19701855051295492], [0.91429283392234861, 0.3066278053783944, -0.58152677684745147, 0.3451074370231213, 0.44590584847803538]]], [[[0.27876878519859294, 0.72367050361484098, 0.4698579397812277, -0.55841126610754066, 0.45158966383148957], [-0.11725395745426059, 0.85466458410370594, -0.97587991383786998, -0.25274146938553055, -0.36931749154291138], [0.32702827505283305, 0.85962527249933141, -0.22722195341342677, 0.49080567493251959, 0.29081232772179755], [-0.031365995680363801, 0.8772783845140586, 0.67511377391665617, 0.14956247224369701, 0.61386384368623159], [-0.00020312198620486832, 0.27165895230830639, 0.099759882830644964, -0.85200068660739126, 0.46555604119064609]], [[0.71076103201418883, 0.072571931446371307, -0.29221505253297564, 0.43603081093921237, 0.49940058646169216], [0.85922412663934722, 0.11217974082313598, 0.42407753784404223, -0.3388085270281842, -0.54157116222426405], [0.69512142183931536, -0.37257427276443078, -0.82471388712120786, -0.70840666938244379, -0.63937369266508082], [-0.83473809428226065, -0.58250833463447149, 0.48042882149766641, -0.47531756174564066, 0.63375505486477479], [0.91708010103202486, -0.15870676248671622, 0.75382156546590728, -0.24392816496736547, 0.27928948631822714]], [[-0.22685931413751259, 0.64466947835952326, -0.38641691197085959, -0.4541812370772782, -0.28400830237487629], [0.77080272657585569, -0.10900354642230714, -0.10541639628454647, -0.3706832635655799, 0.26794524164612121], [0.12167971827197999, 0.25879563101596448, -0.19378713958699834, 0.2421776866850589, -0.41351586533140106], [-0.66247959615766816, -0.22816327304403816, -0.45127893987617274, 0.54893198160199774, -0.60199533978882136], [0.37970159116056457, 0.089735633632783696, -0.79554791423647431, 0.46158905647670023, -0.21589192566386162]], [[-0.01804870230386646, 0.10090492456530042, -0.61557886624311431, -0.39024489806182716, 0.32298854868380533], [-0.17538350279651538, -0.98664297014749125, 0.062420136548681615, -0.6305975848171903, 0.024083230640581821], [-0.76126018849071064, 0.054264189164386689, -0.78362844035012391, -0.82687262704480524, -0.51997774943801978], [-0.66775978786791468, -0.53077387453901914, -0.61847586284863376, 0.1537983414657742, 0.14649311858451797], [-0.81539736395216678, -0.73858306831358811, -0.74441198431187883, 0.11143921752176134, -0.82343612566629232]], [[-0.96563413398877973, -0.24180793195754946, 0.49855356160044551, -0.49979604090700902, -0.45557812819146992], [-0.52677117704892495, 0.4246434020825689, -0.064742601321815529, 0.070618692810830552, -0.45999173682404537], [0.1736376122828005, -0.52331817399602443, 0.38828966568771106, -0.25473083456771839, -0.0043396839063212234], [0.60922304648205317, 0.45808532610170172, -0.54585869700349843, -0.13507372944268803, -0.38274937856823099], [0.76552115562039869, 0.12470235671692254, 0.51082213964338186, 0.10041995638067913, -0.12255734300873322]], [[0.98981582417847913, 0.61546328640484949, 0.92628663344460915, -0.64577343156528988, -0.09409420950387748], [0.50771677867445941, -0.29463743330226944, 0.3340917358314901, 0.94682566732782281, 0.93550905398811524], [0.68554547851864878, -0.77697374844329103, 0.26267254560806763, -0.51155288061572168, -0.62048622829810696], [-0.73393225444326204, 0.84573410171702856, 0.48926453702158512, 0.01095688615492052, 0.57243112951067565], [0.28747512434121281, -0.063390498657096561, -0.67152276068577854, -0.24644660769058713, -0.19515131401864538]]], [[[-0.89330545729220323, 0.85456166096277153, -0.2837658719464784, 0.97941403905573443, 0.28627640147030076], [-0.072801167417636981, -0.23593102679631528, 0.88710668462128384, -0.12364507753109844, 0.78251626222878312], [0.95873518754103793, 0.62713439703904461, -0.4751460331202233, 0.67022231047587111, 0.48281758292812893], [-0.14223444507733918, 0.36495671992089029, -0.52073845466302693, -0.32922587498514821, -0.22193182518935228], [0.80380211265967372, -0.24655261690833674, -0.16778784062830154, 0.64815585119260222, -0.39767113432037249]], [[-0.6041949578273913, 0.44128649316672197, -0.61969217468565696, -0.010847582874290662, -0.72067111444923926], [-0.71199407089260691, -0.44595015412626893, -0.75186115042477097, -0.5962432315221986, -0.48496170655290172], [-0.20490845394646895, -0.45473165643911284, -0.34139187555098971, 0.97772022257361813, 0.76015261337750428], [-0.044341176164955032, -0.15756425628299087, -0.1803955965461379, -0.10688342727490219, 0.36340217371019712], [0.48001544368394367, 0.34918709008888338, 0.7048683647685352, -0.0067029562305260804, -0.44605697901379893]], [[-0.4754348258122636, -0.29182559848084177, 0.33364376207136925, -0.77273080498776947, -0.54294669443101462], [-0.476887235607381, -0.6856036673588497, 0.68282863924525494, 0.53311073477798421, 0.62238257947326958], [0.27593280347515914, 0.096868017949268914, 0.1432261130157213, -0.34201093170040453, -0.498093503082222], [0.7821654854465292, -0.30388690544068164, 0.15988154813489763, 0.30460224781485912, -0.35530775627295608], [0.10382460110637259, 0.71527414905485331, 0.59719575854504958, -0.5500497110713185, 0.67831325888295702]], [[0.19090844280993435, -0.81376018931323602, 0.50181876925612379, 0.043189683567784742, 0.90802900361433347], [0.93830810312910407, 0.32392812998637988, 0.95941030074864164, -0.38330133805752964, 0.2431929997337241], [-0.13929202271500341, 0.89118865517433776, 0.0021125027875521507, 0.096355997832220819, -0.040284128132394459], [-0.13135644086452247, 0.79573574993992602, 0.33573935695556267, -0.40341498455145941, -0.92731204408909162], [-0.56375338015060383, 0.031464097761710441, -0.42567629319318345, -0.20059512547827185, 0.66653147308797434]], [[0.058287379415089102, -0.20305634149886753, 0.4924234025644747, -0.49794766835493931, 0.49501290142275511], [0.93773935588568147, -0.20919520969101058, 0.44447331618016128, 0.49050579631110369, -0.014358051731832688], [-0.937505801941237, -0.98067289237294886, -0.65833947197742115, 0.86941225732294325, 0.82696023224553494], [0.51670167401749856, 0.89931717169253433, -0.55953605289514075, -0.21559585495442946, -0.98437418618372963], [-0.38060918950078904, 0.6229532203665944, -0.54682570043918455, 0.37921948903918357, 0.17831331250022586]], [[0.98531818379513103, -0.2636491898016966, -0.61319721049905107, -0.94170223633520234, 0.076745797499744306], [-0.64913932153784204, -0.71556451119638687, 0.32960906184577388, 0.079274441666167261, -0.45743527128518013], [0.17383641828154195, 0.80404032529125291, 0.30013617824418759, -0.12424109939468764, 0.30631449669555888], [-0.55221949689938077, -0.96280056399393343, -0.73277424713816708, -0.18000008419296987, -0.42373270151283782], [0.68672360287158773, 0.14302310963497367, -0.6264346738065234, 0.18331084231822792, 0.92446850115794299]]], [[[-0.86413778710434186, -0.52167576997527099, -0.69271883776191046, -0.56475279784373011, 0.55848641025633827], [-0.03333154448553044, 0.12777598437678583, 0.1637705900071742, -0.34285617180884653, 0.18919709448251854], [0.073180296340079165, 0.79538800127403064, -0.74526471948013939, -0.53430353253959617, 0.66202619657117134], [-0.66597862869914759, 0.5211713393766948, 0.099966742830234878, -0.49744314260924294, -0.4733581119959156], [0.97198659909185947, 0.36837892633726477, -0.3096491901033267, -0.33233743241903624, -0.145685457108089]], [[0.58851585329858103, -0.41392495532525508, -0.71167687101610788, -0.95795108448112298, -0.22636864994103756], [-0.59370903433153366, -0.31446479789839565, -0.75553497580525075, 0.9455140527104906, -0.98297193447703113], [-0.3508793757598041, -0.55636936972138162, 0.18524120631370145, -0.89504580014178514, 0.75586834121251845], [0.65170780694771158, 0.98881891065021366, -0.6042211096522474, -0.17009129015742386, 0.13314276193206354], [-0.8482795484932133, 0.79828802736090587, 0.67601244211790434, 0.3763927578754096, -0.25454596056818435]], [[-0.99021430767542284, 0.082261039454135654, 0.48933248290474296, -0.35119147482418822, -0.53648012710473103], [-0.11968188651940626, -0.86998771211831838, 0.8432300261296839, -0.67975448598163979, 0.9741710049928074], [-0.44998126309120923, -0.78893166807458681, 0.95555718883228025, 0.059926652007850301, 0.59471450848210927], [0.010918453097047198, -0.59782103218069937, 0.43407925063272135, -0.16261215126184259, -0.18162668513037583], [0.81825458520646599, -0.86612586558323934, -0.12450470041104467, 0.10841253952020313, -0.59249114039100159]], [[-0.76773167034181289, -0.97528433796565417, -0.97745540612602366, 0.23425809238652295, -0.4677495250164847], [-0.28065809730913505, 0.24747520387114164, 0.42369120548261785, 0.053504366397049585, 0.37118529757892493], [-0.66217499017977821, 0.59344324784191316, 0.16008022709893543, 0.76412574056113147, -0.2831276989682161], [-0.69089329933607568, 0.26449728994929544, -0.73290441308268828, 0.39585066464410912, -0.14896055840460098], [-0.43488626047227363, -0.90413811643480835, 0.3982448432334369, -0.043587963824976539, -0.26065562020056432]], [[-0.18703618824270274, -0.3192041252540323, -0.85409697345405799, -0.36972793323477693, 0.61066480595998107], [0.82615334717665734, 0.24453843406030118, -0.65404977989054069, -0.73061567637607694, 0.63664159602794168], [-0.022232495375366312, -0.063563345294932905, 0.34727204115716548, 0.7237530144693689, -0.9248289013701616], [-0.21697470015508791, 0.16493570415156644, -0.79688260520398657, 0.47671851797288589, -0.59806054489148708], [-0.97239222289093941, 0.42420186179373109, -0.18695663545058361, -0.97534066380653806, -0.19244403969498358]], [[0.94330671603718241, 0.48860106234421918, -0.61235331466650744, 0.60996184287997801, 0.59476574083334977], [-0.29612065332062398, -0.3638120700226628, 0.3111257222617998, -0.61274344649460155, -0.88051125267167762], [-0.53158462080103641, 0.89309325636674108, -0.12575510736897688, 0.59265450911238271, -0.11903548324747337], [-0.96168863702550156, 0.97745702492415565, 0.45696777642361663, -0.4042273312194451, 0.21571243524336126], [0.7620478780582427, 0.99277618819906066, -0.97808758035150478, 0.78928306418526395, -0.10674987212640152]]]])
285          ref=acos(xx)          ref=abs(xx)
286          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
287          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
288      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
289      def test_atan_Symbol(self):      def test_acosh_Symbol_rank0(self):
290          x=Symbol('x', (4,4))          shape=()
291          y=atan(x)          x=Symbol('x', shape)
292            y=acosh(x)
293          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
294          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array(8.33432665091)
295          ref=atan(xx)          ref=acosh(xx)
296          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
297          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
298      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
299      def test_sinh_Symbol(self):      def test_acosh_Symbol_rank1(self):
300          x=Symbol('x', (4,4))          shape=(2,)
301          y=sinh(x)          x=Symbol('x', shape)
302            y=acosh(x)
303          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
304          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([9.0128340467828068, 1.3718902793945249])
305          ref=sinh(xx)          ref=acosh(xx)
306          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
307          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
308      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
309      def test_cosh_Symbol(self):      def test_acosh_Symbol_rank2(self):
310          x=Symbol('x', (4,4))          shape=(2, 1)
311          y=cosh(x)          x=Symbol('x', shape)
312            y=acosh(x)
313          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
314          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([[7.553750842366906], [6.937048981588946]])
315          ref=cosh(xx)          ref=acosh(xx)
316          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
317          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
318      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
319      def test_tanh_Symbol(self):      def test_acosh_Symbol_rank3(self):
320          x=Symbol('x', (4,4))          shape=(1, 4, 6)
321          y=tanh(x)          x=Symbol('x', shape)
322            y=acosh(x)
323          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
324          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([[[5.5308249805949483, 1.4699165743642939, 9.434327444936331, 1.2544845857272184, 6.7617834149886722, 8.4343138430179909], [3.547654928552038, 5.5021055889246631, 5.377658252485789, 5.8105784519413861, 8.0533435808276526, 9.9935573134100117], [7.7592876556223214, 8.9791483661733178, 2.1980891704643799, 6.1008409256704699, 1.6202832530216509, 5.3315302850844875], [4.628064837969573, 5.3457530210866784, 5.3242813372330682, 3.0140474460721247, 4.6455001677800283, 9.8479130739468026]]])
325          ref=tanh(xx)          ref=acosh(xx)
326            res=Evaluator(y)(x=xx)
327            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
328        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
329        def test_acosh_Symbol_rank4(self):
330            shape=(3, 6, 2, 1)
331            x=Symbol('x', shape)
332            y=acosh(x)
333            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
334            xx=numpy.array([[[[6.7547292228013145], [8.5635935852168004]], [[4.2423800895906947], [3.4788581921065198]], [[6.3884151399456472], [5.8979560297184737]], [[1.6077362035587761], [8.249800019236698]], [[2.8700573739949795], [7.9587095263136707]], [[7.8702671885207973], [8.9426792716399639]]], [[[8.1793602239730809], [3.7556505063510892]], [[2.4370272274112184], [7.4289177618542901]], [[2.421132291640288], [6.7576972218020064]], [[2.4199471079657258], [6.0289717034995807]], [[3.3628998247995963], [3.5399932100597091]], [[7.7396420264860391], [2.9668579961943302]]], [[[5.0794498552205996], [4.2397742168412993]], [[4.6837984927193395], [1.5330171437942979]], [[5.6887383250104451], [5.5343924396818984]], [[4.61669656391632], [6.974543763785392]], [[5.0124957495203066], [8.553805516316384]], [[6.2344663683977899], [8.343333819674033]]]])
335            ref=acosh(xx)
336          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
337          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
338      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
339      def test_asinh_Symbol(self):      def test_asinh_Symbol_rank0(self):
340          x=Symbol('x', (4,4))          shape=()
341            x=Symbol('x', shape)
342          y=asinh(x)          y=asinh(x)
343          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
344          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array(-0.305160854789)
345          ref=asinh(xx)          ref=asinh(xx)
346          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
347          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
348      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
349      def test_acosh_Symbol(self):      def test_asinh_Symbol_rank1(self):
350          x=Symbol('x', (4,4))          shape=(5,)
351          y=acosh(x)          x=Symbol('x', shape)
352            y=asinh(x)
353          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
354          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([-0.90566130567458236, -0.65485408305469295, -0.9947131131655198, -0.41736566525102003, 0.51411202752974416])
355          ref=acosh(xx)          ref=asinh(xx)
356            res=Evaluator(y)(x=xx)
357            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
358        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
359        def test_asinh_Symbol_rank2(self):
360            shape=(3, 3)
361            x=Symbol('x', shape)
362            y=asinh(x)
363            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
364            xx=numpy.array([[0.051693176444845612, -0.56672278971138801, -0.52456556653203767], [0.95046634837627941, 0.31855117822251677, -0.54005348948910226], [-0.24559405974841653, 0.62146323558990058, -0.070457585321163529]])
365            ref=asinh(xx)
366            res=Evaluator(y)(x=xx)
367            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
368        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
369        def test_asinh_Symbol_rank3(self):
370            shape=(6, 1, 5)
371            x=Symbol('x', shape)
372            y=asinh(x)
373            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
374            xx=numpy.array([[[-0.099747309569801823, -0.85649821982787322, 0.95769055567664529, -0.48923559261248606, -0.43673023851597592]], [[-0.34336304221481129, -0.23292958897214211, -0.25259272877858741, -0.86762054215396622, 0.18246329985350096]], [[-0.64937190875559203, -0.9375483992821485, 0.99697101009171041, -0.1805994930306607, -0.85531933416326988]], [[0.5286263998553038, -0.55105746207607176, 0.73167650439283083, -0.51330780550973998, 0.93636724731868748]], [[-0.95808931524257424, -0.65328986543555723, -0.033317894945694038, 0.68643325054785254, -0.23602683901914334]], [[0.88716233794415245, -0.063533550024919672, -0.19336010575533136, 0.52830882899418707, 0.43554406685224523]]])
375            ref=asinh(xx)
376            res=Evaluator(y)(x=xx)
377            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
378        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
379        def test_asinh_Symbol_rank4(self):
380            shape=(6, 5, 1, 6)
381            x=Symbol('x', shape)
382            y=asinh(x)
383            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
384            xx=numpy.array([[[[-0.35307061156966157, -0.70234401731545182, -0.21917497377831152, 0.36103239183750024, -0.97845657929315344, -0.88683274276598234]], [[0.19526505629657143, -0.86350963828254446, 0.36466574387967299, 0.33815468820189953, -0.088518490781789305, -0.98448631788214236]], [[0.21751533470883211, -0.38499009066891543, -0.56102916104162359, -0.61066400494888051, -0.70300555860421632, -0.9069221717453142]], [[0.75982635372502938, 0.79175754716678659, 0.21325395710657813, -0.012611527679127876, 0.88542760003569376, 0.37591061838254469]], [[-0.032778447579340897, 0.22746799954964381, -0.82041836190266659, 0.87088536171295594, 0.31159212254151258, -0.019918588670879034]]], [[[-0.69886019340442496, -0.57125505499663198, -0.25964502764880448, 0.33169516113012509, -0.27033781692687464, 0.69994305584860861]], [[0.55563995835379965, -0.93984397690490518, -0.6221841823381582, 0.54785344598670416, 0.71999849424369544, -0.52920419423577103]], [[0.20441940382748691, -0.14544055611851947, -0.16173533723804479, -0.53228780179955448, 0.68327397863787631, 0.50803332516837307]], [[-0.42413188051364892, -0.68927597082387138, 0.0027727611834111876, 0.55537694550998085, -0.60441328532456007, -0.49799585049208273]], [[0.022113459709550254, 0.3078917502612375, 0.9409020754782611, -0.22071952389935068, 0.55105374272570518, 0.45880690102283039]]], [[[0.41400205790401667, 0.51600565488107786, -0.3672050565124183, 0.39380450891369745, 0.48673933672655156, -0.99986441405168724]], [[-0.80392837155491592, 0.048209125067510517, -0.81542985403196733, 0.54180827210088367, -0.97909230074223252, 0.047769582518340625]], [[0.13119942927031158, 0.58183489486355278, -0.0060855184042900579, 0.091636878405012778, -0.43595190156114549, -0.36908289055036536]], [[-0.069240184987108044, -0.68441234289061414, 0.58985586631194797, 0.68817099069867216, -0.1532625757536803, 0.14390106199626218]], [[-0.1707555460989314, 0.66284569284101891, -0.65819894306612459, 0.69261469616641658, 0.90825588544149571, -0.60605403257544688]]], [[[0.046151720367192173, -0.058783465913183175, 0.59180720989283953, -0.40861380488406374, 0.67772551447921003, 0.67458038268545639]], [[0.59898140236334929, -0.037094070015828873, 0.47424605515766927, 0.0083513935147558893, -0.1298609088660132, -0.17591736235758249]], [[-0.29177772779172551, 0.5938857912189639, -0.038486695289547734, 0.29664347315775896, -0.65556980226360362, -0.16441189699728875]], [[-0.23148210936713176, 0.57558321408779878, 0.7696816595697682, -0.62767391330540456, -0.44266939322795618, -0.37234725826275916]], [[-0.72710482369767537, 0.58352805244329709, 0.089994750773425114, 0.4274623007390248, -0.88352482646470443, 0.6947147473082802]]], [[[0.7418097401474868, 0.059181358108569615, 0.58894768415997945, -0.58076452630925401, 0.31403319692070308, 0.34553756250796464]], [[-0.84165141432024781, -0.19756830819841498, 0.023048307732113305, 0.25486374659367983, 0.91690247220410437, -0.020580147562289541]], [[-0.81316433427978829, 0.69951876391338752, -0.83090926007453159, -0.8499355434676279, 0.45950364872770577, -0.42508989030507882]], [[0.13428521702412199, 0.85891234824892648, -0.47126176589500046, 0.05785351221075663, -0.09367770691161148, -0.036314419212584159]], [[-0.82543927087303892, 0.79857867240704605, -0.39466292239337353, -0.65653695697325043, -0.95950888115702937, -0.4103344010619705]]], [[[0.98749432660155767, 0.13420119315147572, 0.2827537759808727, 0.013490964462358868, 0.45865823828417618, 0.55625800220279187]], [[0.67602232720612854, 0.99007708748446399, -0.82995838328171878, 0.42496963066431337, 0.12709466392982316, 0.17550815586381407]], [[0.29851795320202101, -0.30791746177949575, -0.37994561463961785, -0.60039495416272692, 0.636230943001866, -0.37723957444435929]], [[0.32456060721487034, 0.82195785084497164, 0.88181074660611025, 0.39114286450275526, 0.69859336084752832, -0.5272452744657381]], [[0.80794181065284576, -0.70205449494118066, 0.52611215985687498, -0.087071461626660795, 0.76206206463978421, 0.87004983287007764]]]])
385            ref=asinh(xx)
386            res=Evaluator(y)(x=xx)
387            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
388        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
389        def test_atanh_Symbol_rank0(self):
390            shape=()
391            x=Symbol('x', shape)
392            y=atanh(x)
393            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
394            xx=numpy.array(-0.30740188897)
395            ref=atanh(xx)
396            res=Evaluator(y)(x=xx)
397            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
398        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
399        def test_atanh_Symbol_rank1(self):
400            shape=(4,)
401            x=Symbol('x', shape)
402            y=atanh(x)
403            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
404            xx=numpy.array([-0.037695893945938419, 0.62526894857112092, -0.14608887353353239, 0.97281037663608805])
405            ref=atanh(xx)
406            res=Evaluator(y)(x=xx)
407            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
408        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
409        def test_atanh_Symbol_rank2(self):
410            shape=(2, 3)
411            x=Symbol('x', shape)
412            y=atanh(x)
413            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
414            xx=numpy.array([[-0.48994866995165354, -0.87108789424614907, 0.92847135376392265], [-0.98521216658549604, 0.67177381591923191, -0.67163133834420785]])
415            ref=atanh(xx)
416          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
417          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
418      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
419      def test_atanh_Symbol(self):      def test_atanh_Symbol_rank3(self):
420          x=Symbol('x', (4,4))          shape=(3, 5, 6)
421            x=Symbol('x', shape)
422          y=atanh(x)          y=atanh(x)
423          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
424          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([[[-0.92033364610268453, 0.99388006145189145, -0.41941966910330808, -0.93244149103745655, -0.4356371394204861, -0.6210775349477351], [-0.69708658000590629, -0.68952402062515028, 0.042183213576466372, -0.40694493457517789, 0.7849431864031553, -0.75929967130475995], [0.93318463264790141, -0.96483394364736808, 0.31819771987871293, 0.61455392016247434, 0.84692510597902926, -0.098599018203737732], [0.083009924486802777, 0.60303822610566926, 0.015327509418948893, 0.54747907352442038, 0.15533651912011903, -0.099246434130309868], [0.37648522142007579, 0.076873275313921186, -0.411446699875051, -0.25332874809693795, -0.86955467816835941, -0.11619315850304579]], [[0.0084955537723747643, -0.68975415308334398, 0.031559992543882975, 0.79932912673141487, 0.032151060813224497, 0.0048383061434784658], [0.40896612212240657, 0.79690534119603051, -0.24305081794953165, -0.3676461779381619, 0.80976551812475295, 0.12979372346717821], [-0.058360848635138352, 0.29130163650997765, -0.54520313967733935, -0.43251129184164472, 0.22438322462521221, 0.65955648973133307], [-0.13083263409806944, -0.32664445188126767, 0.032787622737061595, -0.46359947666468559, -0.40594638245796477, -0.84799501089934548], [0.78555791182288592, -0.74292882698659501, 0.77698664952565766, 0.66157228417909764, -0.92378911678710973, -0.85550735287992619]], [[0.51878802360275755, -0.48156168958134571, 0.0405181666818617, -0.77314298797897729, -0.35985352760272105, 0.50550081434188865], [0.67081221575966321, -0.39317172082181973, 0.63411778898656901, -0.42290978475273677, 0.69682184663234348, 0.41902937903112281], [-0.18033781727880616, 0.69648074381943736, -0.517085639311746, -0.35013944237370054, 0.88228172783971148, -0.77042333767678128], [-0.079801930980052171, -0.74713782921555372, 0.083476890705281637, -0.41116526607464521, 0.3494486432675985, -0.96933506651778156], [-0.095226946452347416, 0.33788300122952086, 0.50360443740645078, 0.033300398040883694, 0.21849620460283448, -0.89685769739426924]]])
425          ref=atanh(xx)          ref=atanh(xx)
426          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
427          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
428      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
429      def test_exp_Symbol(self):      def test_atanh_Symbol_rank4(self):
430          x=Symbol('x', (4,4))          shape=(6, 2, 5, 4)
431            x=Symbol('x', shape)
432            y=atanh(x)
433            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
434            xx=numpy.array([[[[-0.50595458161761031, -0.48012434240442681, -0.54189991532056436, 0.3575458345882756], [0.87181294201370618, 0.96132947469282026, 0.32250944237721391, -0.97639044584342427], [-0.64049473983415095, -0.80783293585467231, -0.38345805421535695, 0.0094834806491435053], [0.59607771803103682, -0.21974170332293697, -0.71658290905993738, 0.934419346207368], [0.21250209916191865, 0.81502491452342296, 0.22186221469875367, -0.16804038807150179]], [[-0.080861692941093022, 0.6764209123168361, 0.70820518808377897, 0.1899028184529945], [0.047522383668316515, -0.1560408724200355, -0.43972303594499662, -0.71627175247091635], [0.50356627540555698, 0.62081910068953428, -0.13091698799334206, 0.71219053794500597], [-0.085354535567049084, -0.002984296890181648, 0.96486237144308196, 0.37278697671976713], [-0.80936368614818055, 0.3285331392508275, -0.11982776888566349, 0.147056748494655]]], [[[-0.49075668167357178, 0.94389548152870839, -0.15872294290043243, -0.26530293739555799], [-0.48057327189098209, -0.84464342314672924, -0.83190065568740001, 0.65245685062068759], [0.84471336966670596, 0.0097716387289095152, -0.17480409446108625, 0.95632671039259431], [-0.69398470304983295, 0.47065276804430156, 0.65358119823831351, 0.1021394632177719], [-0.37803972936713182, -0.73012398023457559, -0.89035232194459346, -0.83284607907675956]], [[-0.46739362628883052, 0.52090225659394673, 0.24901521115430691, 0.71865331081516493], [0.36193494126626224, -0.4395229162287202, -0.39756606891392665, 0.16976393219612951], [-0.93374209020308485, 0.6222628840154123, -0.72269663340760371, -0.28798847385304938], [0.90804390092972742, -0.63530331103511939, 0.73593561865384283, 0.4318272666965044], [0.49713250901508932, -0.14295845495614024, -0.58005296884042301, -0.3336236557013279]]], [[[0.79132250568851292, -0.61789051385021998, -0.62476070800805239, 0.54075469432547507], [-0.16906437906710847, -0.66794690953585922, 0.94890785168424263, -0.015474324418853103], [-0.29889117144243227, 0.70477700609984262, 0.67561924135841323, -0.84709122901916833], [-0.51677646814724421, 0.50150888872188371, -0.4847530134338105, 0.99132929515189705], [-0.89407825481024261, -0.34113479971664384, -0.96823862820636397, 0.45021623575022085]], [[0.88088091470453223, 0.92948601871916847, -0.19076395514815436, -0.81679546833432748], [0.85617312152793246, -0.11226770391899987, 0.17668056661484743, -0.16750425667706259], [0.83399840485467647, -0.60941773402081134, -0.53720561600571393, 0.21986175631068883], [0.63026594889956189, 0.70962713876290873, 0.7594384700932999, 0.90682362718200205], [0.6244759019774655, 0.64144622787676275, 0.13793158314081788, 0.70839487664823397]]], [[[0.95486853181838827, -0.34403721994151648, -0.55331207398602111, 0.16535277047807262], [-0.2779941321896473, -0.84697151875629895, -0.18444077225224054, 0.45925255708781254], [0.263482180060294, 0.57955854743688695, -0.3668203958509324, -0.26006737287869552], [0.67218779452391719, -0.99515793504576644, -0.27320496958885099, -0.35169713718901696], [0.78948918692169645, 0.70805776255978969, -0.61579816940280696, -0.36920148785405527]], [[0.31813346029454825, -0.076326649422539194, -0.34470352930695425, -0.45309118055972597], [-0.46464282018087211, 0.57480355268930028, -0.89339925548515908, -0.11651297927551263], [-0.19040193641982106, -0.86005027194102346, 0.27110647359160578, 0.23056643773859853], [-0.50608063372784984, 0.96529143386638205, -0.74939371610390237, 0.24265446208357311], [0.10966746577523212, 0.65208129067904297, 0.53206632732956027, -0.9173351651692867]]], [[[0.87160044611572718, 0.070787761307107733, 0.44781323588500599, -0.75599903631107734], [-0.06486956834043367, 0.52696571728793185, 0.25090804590547156, -0.18281013491477482], [-0.25654448683208653, 0.41926591495378407, -0.52954384568371027, 0.6135280480217622], [0.036612144566758653, -0.19823012718558819, -0.2402787563130806, -0.40891498574442986], [0.10529083539605066, -0.39968334034362019, -0.1424510102905765, 0.37107738303166959]], [[-0.90302835286851546, 0.33480303513403697, 0.24870368543620591, 0.1555272885851926], [-0.89781074888955636, 0.33338913236325052, -0.98552471300554645, -0.26100742301099999], [0.7666163767488523, -0.35344941739447511, 0.59568351321727508, 0.93389576225863546], [-0.57932600138444368, -0.26678697551817909, -0.61137882986550984, 0.58027253851106719], [-0.40903034032133601, -0.84884546833297958, 0.56372466645224062, -0.82318292656559433]]], [[[-0.1178820541921819, -0.19405562793382547, -0.48743308550485365, -0.97540066244584844], [-0.29406987019157205, 0.23792585529590049, -0.92823196968412214, 0.61277403419149623], [0.95618528896302535, 0.14780603838364947, 0.77437657159224593, 0.64580150234615719], [0.97265391337397089, -0.43071480223735326, 0.53450130670411466, 0.61540570658953708], [-0.35385655175521835, -0.036370170080446851, 0.11720718108113992, -0.61563514335984504]], [[0.68823989059967472, 0.87864572153071752, -0.40335310844017602, 0.65960299419271728], [-0.2890169575309558, -0.042188654359988087, 0.70390836122978673, 0.62944626041251706], [-0.27987332288258782, -0.48190765229162391, -0.99279814238063357, 0.99031419386674924], [0.13435907977926309, -0.29047640203109859, -0.19391974197448847, 0.76118500795060928], [-0.99255389680333805, 0.63833573803280541, 0.8731834845878772, 0.99365950378349899]]]])
435            ref=atanh(xx)
436            res=Evaluator(y)(x=xx)
437            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
438        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
439        def test_cos_Symbol_rank0(self):
440            shape=()
441            x=Symbol('x', shape)
442            y=cos(x)
443            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
444            xx=numpy.array(0.744313053414)
445            ref=cos(xx)
446            res=Evaluator(y)(x=xx)
447            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
448        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
449        def test_cos_Symbol_rank1(self):
450            shape=(2,)
451            x=Symbol('x', shape)
452            y=cos(x)
453            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
454            xx=numpy.array([-0.87032728164804363, 0.11374008045455075])
455            ref=cos(xx)
456            res=Evaluator(y)(x=xx)
457            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
458        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
459        def test_cos_Symbol_rank2(self):
460            shape=(3, 4)
461            x=Symbol('x', shape)
462            y=cos(x)
463            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
464            xx=numpy.array([[0.40440557479481121, 0.48109336729498953, -0.69214590012470145, 0.94316796887954113], [-0.18477061237546843, 0.8169221444969943, 0.81239683394960571, 0.76308094638903867], [-0.04415691513832054, -0.94535006476653605, 0.48642571306477533, -0.81619555658206533]])
465            ref=cos(xx)
466            res=Evaluator(y)(x=xx)
467            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
468        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
469        def test_cos_Symbol_rank3(self):
470            shape=(3, 6, 6)
471            x=Symbol('x', shape)
472            y=cos(x)
473            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
474            xx=numpy.array([[[0.050830939270013253, -0.32532295006522594, 0.16985234505692848, -0.45372701511022706, 0.71380654136432109, -0.18771902696756082], [0.3413617005706262, 0.1939301785315668, 0.11930509433521519, 0.76345385913042119, -0.27375383729760605, -0.74735951851044935], [0.076028925907605682, 0.27071742352796746, 0.31630062694392613, 0.24553680807206435, 0.017502704678636016, -0.85592641810542514], [-0.081804155310240878, -0.2293916919445349, 0.18707383804290867, -0.36062913429328436, -0.78037998598948644, 0.99794599498745917], [-0.28177191638950894, 0.29429504769405201, 0.28844661160969953, 0.45858996531847063, -0.11657572600116728, -0.44669835924140378], [0.38131338175846219, 0.0059724582328131159, -0.32641416945274382, -0.53822066162485394, -0.2206480842603471, -0.29317687102531331]], [[-0.13081360670803321, -0.9657468143675465, 0.81203946014714679, -0.73358213801123506, -0.32002273769680811, -0.81260536639077308], [0.46010810725996332, -0.65803086228757857, 0.76580456418984411, -0.9789890981942142, -0.85795630094181163, 0.74465292109361014], [0.47671923728939913, 0.36062839353446807, 0.70735897564153349, -0.062707134287202315, 0.51417771069447493, -0.58323501462219607], [-0.8120926869397509, -0.83631123409016839, 0.52727304211122528, -0.33291776607484724, -0.4880680514758382, -0.4741732328864201], [-0.66048284801713941, -0.50907789201544573, 0.21895919612627179, -0.87541715256882946, 0.66024653727823734, 0.79055087481060471], [-0.35270823898426684, 0.75618434122650546, 0.10171155079879557, -0.53034870036175774, -0.71868561541777365, -0.54647152059687976]], [[0.9646286990412023, 0.37618615446213455, -0.62877956939523605, -0.27582306985953076, -0.99514527140199505, 0.83945547763216855], [0.25782129214313154, 0.29497006321385721, 0.64149883663690499, 0.91429427844291267, -0.42853580324366414, 0.7863903871297826], [0.76222765005258286, -0.04697992922695593, 0.10215695616790299, -0.6288057322124263, 0.72639944614772611, -0.60498735009686833], [-0.91861458853302014, 0.58417703366242724, 0.92424491033133949, -0.83820749729209387, -0.060495601844684499, -0.38933016458191672], [0.10796181563958185, 0.033546843096989409, -0.6441137674651829, 0.066504892248698377, -0.72690469719870077, 0.56098745873822287], [0.97582346986034829, 0.19462154113151242, 0.24175349681201519, -0.88105509471613663, 0.52248335924768674, 0.54757860357751276]]])
475            ref=cos(xx)
476            res=Evaluator(y)(x=xx)
477            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
478        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
479        def test_cos_Symbol_rank4(self):
480            shape=(6, 3, 3, 6)
481            x=Symbol('x', shape)
482            y=cos(x)
483            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
484            xx=numpy.array([[[[0.90130764213380599, -0.3987458024207069, 0.43753960035756689, -0.87096776079254568, -0.6381515048782509, 0.52818156892138601], [0.060117109496389265, -0.37152732319635273, -0.82152519927311318, 0.7348505943465875, 0.91526601626205872, -0.66192735275312375], [0.4247802242122749, -0.61033245627272703, 0.86720071989130298, -0.58988042209986902, -0.53523568505976593, 0.13686036458278328]], [[0.33923293174530578, -0.76709446895195033, -0.15072829523481923, -0.47578836295648741, 0.19713486155029747, 0.10685622312061804], [0.47686465443879755, 0.72190081730519529, 0.063160538964780688, -0.7695313899924725, -0.83843240604395519, -0.24519992446274164], [0.3769419377077261, 0.12679063343481634, 0.89925489452009622, 0.22146365625957376, 0.51040582713515614, -0.15838712669446786]], [[0.048742292663935149, 0.42874107415583618, 0.45753318915841623, 0.53742554048514757, -0.7911887759151679, -0.66050909751848619], [0.97338344695601409, 0.79173118903288331, 0.51619466599452246, 0.034543730156339381, 0.94822574156045003, 0.26298449419533054], [-0.02652986106634625, -0.6860793931174396, -0.75546140130787776, 0.080649735469170647, 0.88523191060171769, 0.65795886110787394]]], [[[0.26981229709094667, -0.81497400207902682, -0.84671727048304057, 0.60261597414286117, 0.22835173019552157, -0.016273828247253208], [0.71909008599842617, 0.50631739790508923, -0.58513308721788859, 0.97676815443708565, 0.69326836772205613, 0.099617483463117162], [0.56247717180353507, 0.74415958645991087, 0.69933058111874336, -0.24296843432043147, -0.50595039440005229, 0.76358511477869784]], [[-0.36158695744226743, -0.014889441705109085, 0.63245934957020289, 0.26090388259239572, 0.89547176184827748, 0.5400078250481779], [0.74407086167123482, 0.57211090016210586, 0.84938266479999358, -0.7647577048106553, -0.30722520483570537, 0.37921401311435399], [0.3036932830547483, 0.91827388803721277, -0.96806787622028212, -0.83914775113563378, 0.37347312453401815, -0.43651632983547417]], [[0.26153352730345625, 0.74640866999307143, 0.038581980598738408, 0.93602414052355387, -0.82591317787693108, -0.55832661997326816], [0.66434432179938718, -0.0091209620279408821, 0.13589585799587223, 0.41241122318231005, -0.75271980315592923, -0.98362937176294785], [0.42199953242922139, 0.54779691779638973, -0.30513320675433087, -0.054582676041165401, 0.081757206126019222, -0.11680967552197408]]], [[[-0.93993915734366773, -0.36134235953934746, 0.050720802074974758, -0.47522738435585521, -0.3447062743317979, 0.33402208154508473], [0.14297379748708994, 0.752683846755831, -0.83219218100303927, 0.19067328012590146, -0.49936335670963961, -0.70311052609382307], [0.40035522085434083, 0.45098789307720044, -0.62210751455260138, 0.084800993027836613, -0.78332596098602347, 0.47619940634228652]], [[0.80950948951586765, 0.66663538777459652, 0.40195617664590433, -0.51355043955739665, 0.29264333009281374, 0.25247356480361804], [0.34066091476879534, -0.69373669367699642, -0.83033162749320533, 0.6714682548819888, -0.50631864812719152, -0.64789490347801859], [-0.43957423913649141, 0.46393526659048501, -0.43444065233104157, -0.25745629603113751, 0.087452173825961932, 0.49829571579454379]], [[0.70746506863339143, -0.98210277106766397, 0.94288430191577199, 0.67623122800889512, 0.62187518177783119, -0.28302424638184842], [-0.82157455997771178, 0.0076091454322362306, -0.63437444811479726, -0.090068418904809322, -0.65908942270294535, -0.53785389603275946], [-0.21515494144345393, -0.42233855220612981, 0.074973319092087376, 0.62606841330103569, 0.3513506009594296, -0.45451785873124106]]], [[[-0.73500731284133392, -0.08209094331524236, -0.85299167589577185, -0.60906595608971781, 0.48651918489478474, -0.99942255956408865], [-0.37687378878108846, -0.5904804429381969, -0.847737519196337, 0.51480435939832603, 0.17375778897441574, -0.77141871255874794], [0.31748009707810954, -0.91839906000681149, 0.58312103484410183, -0.94441904311386837, 0.7358843131742554, 0.17684929962725926]], [[-0.15991886969881008, -0.064523595231283482, 0.35939812595740261, 0.91417417621588593, 0.13287064601742071, 0.25548392778906392], [-0.388554208651406, 0.50138595060097391, -0.53842846203222416, -0.1119828811558683, 0.24453047069547851, 0.87997645522042323], [0.83757243850117624, 0.66840870802633101, 0.62320076199142371, -0.11631044150819725, -0.55311300826660559, -0.18693489799112761]], [[0.7182790090620832, 0.37158268878938516, -0.17003848010446831, -0.053742725158562044, 0.4164094581475426, -0.73132217977551961], [-0.063965043698682944, 0.015717507034008316, -0.52291776972817994, -0.49052724130933711, 0.46426540469355482, -0.1127261365549066], [0.97925656888408663, -0.819196236828865, 0.095591631291240819, 0.72328952360233711, -0.32487162573953232, 0.86284373689811567]]], [[[-0.2027814598631581, 0.67949292564702168, -0.60401437079640963, -0.74538532268084223, 0.5579729432152265, 0.75849102676092461], [-0.019307222401833135, -0.65549342771306507, -0.77233876148109704, 0.89902832360630591, -0.80680119495709079, -0.6405658772652949], [0.94014130102832483, 0.84306872077984196, 0.74800788316015976, 0.0060177474791682783, 0.43725773372525878, 0.34984797819528568]], [[0.94762400130394964, 0.88333082586130285, 0.14220697515329839, 0.79604665198582292, -0.85077316464406039, -0.44937629417352243], [0.83787005144811988, -0.19991403179860656, -0.58188033439558051, 0.11292590964521643, -0.76450749814531305, 0.067751672486419334], [-0.66254592802901957, 0.66448649280648087, 0.99594742653685153, -0.5755472873899814, -0.29480648963969092, -0.95539954185027387]], [[0.70076791457796528, 0.60030660682102432, 0.21214052747322154, 0.76342416049061756, 0.034063173129666557, -0.11733111138881558], [-0.54577914925516335, -0.3273219683667945, -0.65232106965500725, 0.77613545133360429, -0.019419777543767003, -0.70183548064713674], [-0.9414527394835901, -0.30075254640320148, 0.44952020653136926, 0.65042339474085686, -0.66077644624855636, -0.055775779731917163]]], [[[0.4116851957915868, 0.48460392698354915, -0.87832411361741336, -0.63667584369533681, 0.55660890519011175, -0.1862509514015136], [-0.93046503218253962, -0.34957207938656198, 0.61769304269603609, 0.92574017933184405, 0.70676336789471095, 0.088814076834122346], [-0.99497317655862028, -0.1075605435203264, -0.26444564277706517, -0.97685453170078174, -0.71022306695674087, -0.95667061517215468]], [[0.8829996687327597, -0.090941624626471596, -0.62187019552906464, 0.4358229560415654, -0.025857172985317423, -0.3425327120948467], [-0.4345921868101088, -0.25294389885728652, -0.11590349513867215, 0.71403376842926858, -0.12383088352167282, -0.31106072075959856], [-0.095515411521287064, -0.38909371128846226, 0.47375180785996074, -0.3303062624063875, 0.81550659004260839, 0.57986829294876041]], [[-0.37936204571308618, 0.69530465557018317, 0.39233885389717238, -0.58628754854679399, -0.82342883162217673, -0.84345490579231952], [-0.15905901646080567, 0.013874995473203366, 0.57618877843174854, 0.67869102393767622, 0.79958383289872814, 0.5796798096537954], [0.7887874366502079, -0.35953067764963786, 0.56541349919790629, 0.29904866210137504, 0.53708214043586899, 0.39766061906978112]]]])
485            ref=cos(xx)
486            res=Evaluator(y)(x=xx)
487            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
488        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
489        def test_cosh_Symbol_rank0(self):
490            shape=()
491            x=Symbol('x', shape)
492            y=cosh(x)
493            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
494            xx=numpy.array(0.402108089169)
495            ref=cosh(xx)
496            res=Evaluator(y)(x=xx)
497            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
498        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
499        def test_cosh_Symbol_rank1(self):
500            shape=(3,)
501            x=Symbol('x', shape)
502            y=cosh(x)
503            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
504            xx=numpy.array([-0.67598720921227007, -0.49881014119885325, 0.2299699027667792])
505            ref=cosh(xx)
506            res=Evaluator(y)(x=xx)
507            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
508        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
509        def test_cosh_Symbol_rank2(self):
510            shape=(6, 6)
511            x=Symbol('x', shape)
512            y=cosh(x)
513            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
514            xx=numpy.array([[0.89639309186613403, 0.72909659790266179, 0.34662230795430937, -0.71064041663998823, -0.77548621502705206, -0.58207982593263208], [-0.18463194776559, 0.053848226323171877, 0.83067893856903963, 0.43369159112750366, 0.69564729941949888, 0.59955421273446108], [0.87063238696805456, 0.040576236435829527, -0.43175629174862573, -0.024086430651321766, 0.33085278283250474, 0.3180318274923104], [0.24546629681187859, 0.9452888898399372, -0.27356287093192644, 0.57271572373925661, 0.87200819839683219, 0.59949284927717961], [-0.12867145218480447, -0.50066636596699032, 0.30852992931322243, -0.16513524813044667, -0.37315104409421629, -0.55462476134862726], [0.25280517728497376, -0.055220420147431115, 0.53623088293929477, 0.32583990189530665, 0.0039738091869052639, 0.98997804445228321]])
515            ref=cosh(xx)
516            res=Evaluator(y)(x=xx)
517            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
518        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
519        def test_cosh_Symbol_rank3(self):
520            shape=(3, 3, 4)
521            x=Symbol('x', shape)
522            y=cosh(x)
523            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
524            xx=numpy.array([[[-0.70239984268050648, 0.33088339398914712, 0.16660749245356654, -0.40924309490581967], [0.56607827906859787, 0.12011935947007091, 0.43846194223397128, 0.57649902388423713], [0.57869443180556446, 0.75117486662581556, -0.61169393602489452, -0.56391729859957307]], [[-0.46011438900062207, -0.90684939195868708, -0.47587299655961557, 0.19845111892158607], [-0.27546899095029165, 0.5922308894980024, -0.85023460166006748, 0.18704184430729609], [-0.098275784292758406, 0.33495056497229858, 0.88562922483537854, -0.75546256854041927]], [[0.27193737478971314, -0.49577400090702262, 0.67141717574833848, -0.047584588554963059], [0.051057570065553559, 0.44733262986405986, -0.7626774545685715, 0.91166081431175372], [0.019422710112758201, 0.4465486196061601, -0.34203256346098621, -0.99937332419806491]]])
525            ref=cosh(xx)
526            res=Evaluator(y)(x=xx)
527            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
528        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
529        def test_cosh_Symbol_rank4(self):
530            shape=(6, 2, 1, 5)
531            x=Symbol('x', shape)
532            y=cosh(x)
533            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
534            xx=numpy.array([[[[-0.061743634236205658, 0.22946321456855268, 0.86703993320496897, -0.53316377059117404, 0.70331684372061032]], [[-0.27756894057414661, -0.35711600295974955, -0.12911087703504021, 0.53149199125798607, -0.92285042951248397]]], [[[-0.12593421524892623, -0.056150681569911098, 0.47031733087534233, -0.31812485273293611, -0.76828773826467311]], [[-0.33749793446147769, -0.16832814114339012, 0.40409250194453339, -0.24072992710319219, -0.16641694437351573]]], [[[0.66186076131742633, -0.1205345396673172, 0.30092337319162876, -0.46668878547542914, 0.14330008555380824]], [[-0.36798071219300144, -0.53483406087867502, -0.481909508870485, -0.37485353338074079, 0.97965580238649963]]], [[[-0.66084438709249937, 0.68016927142985151, 0.50202779102215245, -0.55718689524600862, 0.93459975027611919]], [[-0.21607697003893245, 0.087036431973694928, 0.41330747236124288, 0.015219834073604055, 0.2295926388227425]]], [[[0.028410338979888206, 0.86731928618197474, -0.28036076329250337, -0.057943420501337606, 0.63951697010863717]], [[0.18331478341365059, -0.23373557424842173, 0.66845576462458633, 0.58273200111117007, -0.89929604470738145]]], [[[0.31176460885074886, -0.64664533090752152, -0.83263233779065216, 0.27255663724984713, -0.79801387939557489]], [[-0.94804553428057359, -0.52812209760041373, 0.52161168477263287, -0.30795099737284959, 0.71037017671697722]]]])
535            ref=cosh(xx)
536            res=Evaluator(y)(x=xx)
537            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
538        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
539        def test_exp_Symbol_rank0(self):
540            shape=()
541            x=Symbol('x', shape)
542          y=exp(x)          y=exp(x)
543          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
544          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array(0.868671218394)
545          ref=exp(xx)          ref=exp(xx)
546          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
547          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
548      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
549      def test_sqrt_Symbol(self):      def test_exp_Symbol_rank1(self):
550          x=Symbol('x', (4,4))          shape=(2,)
551          y=sqrt(x)          x=Symbol('x', shape)
552            y=exp(x)
553          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
554          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([-0.90380593214520966, -0.62656449506193845])
555          ref=sqrt(xx)          ref=exp(xx)
556            res=Evaluator(y)(x=xx)
557            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
558        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
559        def test_exp_Symbol_rank2(self):
560            shape=(5, 4)
561            x=Symbol('x', shape)
562            y=exp(x)
563            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
564            xx=numpy.array([[0.78397405312973145, 0.59035146388683657, 0.62875075822049786, -0.1413436731759623], [-0.30010491653212013, -0.21132080131130837, -0.67326575726351723, 0.41698950821260139], [-0.24041295766119131, 0.76668348248895501, -0.018825514566945589, -0.41610314307895813], [-0.43461869838916467, 0.094807733462043187, -0.58968332524080269, -0.49246760388896549], [-0.47978843847064634, -0.83371167570947136, 0.24758012112036609, -0.8703039249553608]])
565            ref=exp(xx)
566            res=Evaluator(y)(x=xx)
567            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
568        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
569        def test_exp_Symbol_rank3(self):
570            shape=(3, 4, 5)
571            x=Symbol('x', shape)
572            y=exp(x)
573            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
574            xx=numpy.array([[[-0.58620039755522835, 0.36337755869952582, 0.92402636794214077, -0.83808397422482428, 0.30844867196121051], [0.039632961579486592, -0.052586327191042725, 0.92325064629927223, 0.66552698512300368, -0.35876338482047077], [0.54859234585201255, 0.40306087586478512, -0.95300823467775619, 0.32774574587367655, 0.97494289618741492], [-0.55372884317737681, -0.16667034782612822, 0.22399017746557215, 0.59980611758558178, -0.92084056547030047]], [[-0.19801396240086078, -0.55759032847393497, -0.067395379931253885, 0.079775975516888309, 0.1020278924486353], [0.67184235851298935, 0.27021452130074142, 0.79724018749798109, -0.63587254284764305, 0.46886196775826972], [-0.60927074743760734, -0.17722591142501454, -0.044930720202142949, 0.89347221557975742, 0.37291227557287754], [0.40572712936777289, 0.79928706197880506, 0.14427602704618092, -0.021027222801917711, -0.60600423065638354]], [[-0.50421018881816559, -0.14002424681417569, -0.44295553334627735, -0.40249606939125493, 0.61408513492662786], [0.36349973330540086, -0.86190815382638197, -0.90195022929107038, 0.19370239768604347, 0.99010828753320501], [-0.46896987036159588, 0.9233909626371517, -0.46496527410702737, -0.64720412711975772, -0.92571146869488175], [-0.17464927078531245, 0.54362439780330996, 0.59197092274338603, -0.21537012837486436, 0.10635564448303847]]])
575            ref=exp(xx)
576            res=Evaluator(y)(x=xx)
577            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
578        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
579        def test_exp_Symbol_rank4(self):
580            shape=(6, 2, 6, 5)
581            x=Symbol('x', shape)
582            y=exp(x)
583            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
584            xx=numpy.array([[[[0.99892598214714567, 0.99074005547977739, 0.76387176897573017, 0.87872031482820478, 0.42586937347640741], [-0.418701546627545, -0.76503610086086304, 0.55384836621382605, 0.0069135710367693726, -0.44002351829313691], [-0.77416892827447392, -0.25419115970574402, 0.40312387535662109, -0.8433593766502161, 0.58054744207671205], [-0.45431488878000081, -0.52304424139510663, -0.58428249707049784, -0.40041492442326665, 0.05085312176619694], [0.94859142540434949, 0.51156577882749921, -0.56257723432061812, 0.6038798980355462, -0.78634719531121333], [0.97134981541977861, 0.2705155983309353, -0.91287133451434199, 0.25898028431065656, -0.45492178665053107]], [[-0.86651654040558346, -0.23796606167688683, -0.90907494500989849, 0.28161973467102164, 0.49568307288099378], [0.45576969673964585, -0.28904458622533569, -0.59036745529393619, -0.89622174403991495, -0.036846157247919509], [-0.068810647720832119, -0.27759754129820835, -0.016944708998201552, -0.81824898991503403, 0.5978354093572511], [-0.58621896771589443, -0.90882779992269502, 0.49275875115929368, -0.8673301367813171, -0.46495595425466241], [0.23703597632279449, 0.23471628444579506, -0.18938191048648134, -0.43204118465780783, -0.4151435992331407], [0.73142781367336496, -0.73258543156187939, 0.10204643577852202, -0.07462101595704862, 0.96147105055417703]]], [[[-0.10374851421307718, 0.36988374323184026, -0.12559075506254591, 0.21124286270354586, -0.45435840482992651], [0.040644591913166828, 0.8865144651640402, 0.7158478820579488, 0.23510609444875374, -0.27275071457407729], [-0.40653126738833545, 0.016553644583680027, -0.054653580839174376, 0.43681397135733513, 0.2095205020314399], [-0.24614236784342491, -0.97825338514529858, -0.37226342883134622, 0.66167568078743977, -0.013374840103652863], [0.98196795789929836, 0.56377038072460617, 0.25813930530654328, 0.47492099206678917, 0.35972433449415231], [0.31617333424738225, -0.55001303877344587, -0.19085226185146675, -0.57430402686585502, 0.53831098488914675]], [[0.19555450324376955, 0.9506006381368679, 0.40598083505182836, 0.18594567228032965, -0.29045315072829503], [0.70720849753798265, -0.89119159629050615, 0.11813266404211054, 0.060727768945146199, 0.28153262443325966], [0.31590977240963181, 0.37787697042615931, -0.5069049168602946, -0.78351235771807182, -0.3525224289381268], [0.64705588679502002, 0.72249934391079718, 0.75599274213041689, -0.96879530861575569, -0.77927969173494938], [0.96630969769917385, 0.28015984115605241, -0.45553644347485855, 0.5645212050302979, 0.99635986389428655], [0.049649085168637752, 0.47542968795066964, -0.34760335808618503, 0.1567744581130619, -0.81133167739719703]]], [[[0.62584871514143248, 0.69872351016447376, 0.076683506047626082, -0.10502680974445, -0.2892164544023017], [0.0096339383502657139, -0.43507603838709996, 0.020184526766267696, 0.14174956933901672, 0.96754240181185458], [0.87057869650422437, 0.66923738316430614, 0.66946039098790266, -0.60647660304952367, -0.41184672707778325], [-0.44095348287591496, -0.56421029180212257, -0.95668038354106488, 0.60029538692703377, -0.37883387762711518], [-0.18312432498447695, -0.16706689191477375, 0.002654462764751564, 0.86870006885228124, 0.52560425660421073], [-0.053946658008284798, -0.62674153410514211, -0.18957326783217243, -0.027619954246946188, 0.74109518424227572]], [[-0.4511043059927331, -0.32663102920775011, 0.75442411953320598, -0.56747770272154763, -0.31104910112534223], [-0.038469538751558785, 0.39347992608554638, -0.67323096188016374, -0.9940226580375906, 0.81696177000497716], [-0.24284426863328745, 0.77053470795170331, -0.89340243979227751, -0.72052395695449567, 0.52995401965684086], [-0.090166604937540251, -0.060344234960793219, 0.26917922222077872, 0.3916960107330334, 0.4393204488002096], [0.26600539828612479, 0.99131733973571001, -0.20614243380621544, -0.65261221748317588, -0.93808249358610896], [-0.3458263680101572, -0.82648441266615325, -0.94130137702247785, -0.83114514681954943, -0.67439275072595928]]], [[[-0.9537478582033716, -0.46778725092049322, -0.010448215705561203, -0.19540803484328384, -0.53204924033616896], [-0.77361777564348633, -0.70549188223589088, -0.079293303491019484, -0.78193136298793098, 0.14821699943777245], [-0.83465015218220162, -0.47972277292372989, 0.24160360490655997, -0.76581346579060683, -0.27057221324884417], [0.36041693513037498, -0.56753544637363684, 0.52379510766188409, 0.056904074080126321, 0.70901801593409708], [-0.83157146425538686, 0.92155094618158029, 0.27423077731933354, 0.19992466263788367, -0.93791552263738609], [-0.97832523586956666, -0.19166899572469109, -0.27762345774008201, 0.89150581047711053, -0.26261757566597721]], [[0.71601027095252823, 0.34185994460838542, -0.7979754625517177, 0.20451240104371937, 0.88144318070992589], [-0.66944354370132486, -0.88564701326565221, -0.39161140936557581, 0.40125172052593072, -0.51370147498469509], [0.13860352410476318, -0.35380056962850137, -0.5902334371330924, 0.28420135920098977, -0.58833868837679382], [0.32218707893219234, 0.92742387401452708, -0.70855565145399169, 0.45308382374242551, -0.2814626579694266], [-0.57175590658235831, -0.099369921829138841, -0.031462233400973316, 0.22785502958140746, -0.11530865875602925], [0.25292042178771346, 0.90595538550572341, -0.87223376119078799, 0.049053363755885426, -0.40809698049839693]]], [[[0.89036534006332557, -0.93019081739752107, -0.68279824759509578, -0.17135016642764178, -0.09670623519047794], [0.099970796120361083, -0.09110559752716596, -0.075365693146379309, 0.21725594077504518, -0.3532053404788158], [-0.1265169993366746, 0.66744478658680007, 0.90756994762842136, -0.62822744656999996, 0.34148262899503656], [0.37270201582441653, -0.048938161484505249, -0.27913908220189643, 0.47903245717247844, 0.19370765019915326], [-0.27715000074199692, 0.63735868092599657, 0.54459640401184028, -0.83548845649900305, 0.23391907618606766], [-0.87934434427225527, -0.19443183763836669, -0.4817524481294666, -0.96405568608012571, -0.45019566308680403]], [[0.62929698383161536, 0.72746409972846293, -0.30580248722096259, -0.40119675704410618, -0.48724222433212327], [-0.63327247838121914, 0.25316020705323328, 0.35493720142992013, 0.51039213372672387, -0.21608498703314916], [0.00059892521596904835, 0.64256462882357912, -0.28605073619740407, -0.018883261588773292, -0.51216567896294252], [0.250884471473104, 0.9651989322537462, 0.86257649740321352, -0.71425913251830742, -0.8143342610938189], [0.38481942228424093, 0.67056559144784167, -0.20216680602478743, 0.83791286075167859, -0.70352409947539041], [-0.54484895017996315, 0.46506132351239859, 0.37631570295057926, -0.059740443013040601, 0.11574338099070913]]], [[[-0.47623377409215339, -0.73262274360392543, -0.13490358335245523, 0.51749666142433659, 0.41688836606618751], [0.48237672198694148, 0.61153331894097707, 0.44761255383225729, -0.45405812216107289, 0.33806739269218999], [0.98074396147916465, -0.2084328162963065, -0.015346524028609032, -0.82235709696022363, 0.28851960553817779], [-0.55288631855668946, 0.56831131085868791, 0.92686749753884201, -0.32530804098977928, -0.7472158615170259], [0.42952271242410145, -0.86425845331235496, -0.46461177379449214, -0.85644585390531724, -0.7513211548334553], [-0.58977229222444216, -0.40292180646414022, 0.63737605115349205, -0.083832829443432288, -0.15987768776744793]], [[0.71649321918585263, 0.10425486868579914, 0.93615867870324254, 0.4752087479232987, 0.65040627967723696], [0.44990563920442339, -0.3866770819507428, -0.31491158125408947, -0.26959214050638702, -0.17167258344834102], [-0.93496893608819143, 0.70387879270841403, -0.27852678218383731, -0.05521099116576611, -0.75726392507912976], [-0.63082457489514066, -0.74196685343675051, 0.43250483205861334, 0.07486604855246326, 0.45427828540779847], [0.96141347022493906, -0.77527378130451763, -0.76949790882106739, -0.14484556479579869, -0.25158749991359963], [-0.71295723928226806, 0.14499664357415831, -0.67828638747239167, -0.26477664845792082, 0.99191445989305338]]]])
585            ref=exp(xx)
586            res=Evaluator(y)(x=xx)
587            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
588        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
589        def test_length_Symbol_rank0(self):
590            shape=()
591            x=Symbol('x', shape)
592            y=length(x)
593            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
594            xx=numpy.array(-0.0850861845093)
595            ref=length(xx)
596            res=Evaluator(y)(x=xx)
597            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
598        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
599        def test_length_Symbol_rank1(self):
600            shape=(1,)
601            x=Symbol('x', shape)
602            y=length(x)
603            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
604            xx=numpy.array([0.16265521862063004])
605            ref=length(xx)
606            res=Evaluator(y)(x=xx)
607            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
608        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
609        def test_length_Symbol_rank2(self):
610            shape=(6, 4)
611            x=Symbol('x', shape)
612            y=length(x)
613            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
614            xx=numpy.array([[-0.052943848824303474, -0.89892923906978761, -0.66135854875188116, -0.73726496191456881], [0.75312590004513313, -0.81760794846437657, -0.15034875775916157, 0.27485527445898872], [-0.92365196196947941, -0.68511507747596201, 0.39028216982189545, -0.38250523763728905], [-0.68610050535936229, 0.69972962958134288, -0.92336114229590094, -0.25782995910905826], [-0.71059679967754041, 0.57854419678239744, -0.64403132121071827, 0.0047885613516003289], [-0.50874802052749191, -0.62209956795408039, -0.54567033751519345, 0.95588637061425152]])
615            ref=length(xx)
616            res=Evaluator(y)(x=xx)
617            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
618        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
619        def test_length_Symbol_rank3(self):
620            shape=(3, 5, 4)
621            x=Symbol('x', shape)
622            y=length(x)
623            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
624            xx=numpy.array([[[0.75614046384458922, -0.7970498802198851, -0.84966914182900322, 0.061650156275080636], [-0.52659700149031807, -0.68229512311137697, 0.27968575172680166, 0.89140187507329816], [-0.2594477426687638, 0.672991341023915, -0.071397548256503462, -0.22830304678315594], [0.57901934180242898, -0.46487468696648371, -0.66637654768880883, 0.19173801234591537], [-0.72994454574302048, -0.86088113314925963, 0.52244695915063755, 0.38704435676034743]], [[0.81248414404024949, 0.24994021107486097, -0.79916056958985715, -0.58139287932407302], [-0.0072530988668972896, 0.89495201559312076, -0.096430020769235458, 0.24899349370484103], [-0.94204636479712467, -0.6974358120395725, -0.52638195331000559, 0.20243282535855145], [0.3567469247913293, -0.7150729521209811, -0.7240326778924735, -0.99378025496362898], [-0.072743116961521359, 0.91019136488905095, 0.61240071136552143, -0.71313902783548433]], [[-0.74165520760405768, 0.89445492569606588, -0.7015260278845652, -0.42169465043710264], [0.12207796829634487, -0.5045347186205078, 0.22366845239104394, -0.34929167194958644], [-0.2132723695902512, 0.0060316155934456717, -0.94651911355423568, -0.090780075941495841], [0.46484104220262257, 0.68119790066609753, 0.27783882334114374, -0.47421092450998659], [-0.42575079790836123, -0.3180246028958007, -0.54383061445744763, -0.13424568927511604]]])
625            ref=length(xx)
626            res=Evaluator(y)(x=xx)
627            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
628        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
629        def test_length_Symbol_rank4(self):
630            shape=(4, 5, 1, 2)
631            x=Symbol('x', shape)
632            y=length(x)
633            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
634            xx=numpy.array([[[[0.43391337168683752, -0.60465677985059063]], [[-0.055177440833841462, 0.9434530756470445]], [[-0.073435891790755603, -0.88462861316724228]], [[0.84832776482016903, 0.75612869959334961]], [[0.38756560802492723, -0.83040953095413483]]], [[[-0.70370600450900267, 0.27724640288667901]], [[-0.2381396200854522, 0.8949463357015599]], [[0.25664645951040632, -0.95818018759463341]], [[0.10661353595404566, -0.14324064717287577]], [[-0.36904066147714865, 0.5601361329549055]]], [[[0.9380886233005199, 0.369291340399311]], [[-0.51311825950722567, 0.65374411098057772]], [[-0.88619712161084374, -0.77450359542579061]], [[0.93890691560566286, 0.43101630915167677]], [[-0.072746071827342274, -0.38711750220817964]]], [[[-0.43010793153676441, -0.26376405447248574]], [[-0.74475269801009203, -0.11784853154247688]], [[0.38457877308017463, 0.21050899999232486]], [[0.17269051405915459, 0.22281671178151807]], [[-0.43258223318309152, 0.68688967521104427]]]])
635            ref=length(xx)
636            res=Evaluator(y)(x=xx)
637            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
638        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
639        def test_log_Symbol_rank0(self):
640            shape=()
641            x=Symbol('x', shape)
642            y=log(x)
643            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
644            xx=numpy.array(0.933647132269)
645            ref=log(xx)
646            res=Evaluator(y)(x=xx)
647            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
648        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
649        def test_log_Symbol_rank1(self):
650            shape=(2,)
651            x=Symbol('x', shape)
652            y=log(x)
653            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
654            xx=numpy.array([0.11792061292161338, 0.01357918648343226])
655            ref=log(xx)
656            res=Evaluator(y)(x=xx)
657            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
658        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
659        def test_log_Symbol_rank2(self):
660            shape=(2, 2)
661            x=Symbol('x', shape)
662            y=log(x)
663            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
664            xx=numpy.array([[0.96940703536799999, 0.26890808026192681], [0.49905387111493626, 0.82897583793055762]])
665            ref=log(xx)
666            res=Evaluator(y)(x=xx)
667            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
668        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
669        def test_log_Symbol_rank3(self):
670            shape=(1, 3, 2)
671            x=Symbol('x', shape)
672            y=log(x)
673            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
674            xx=numpy.array([[[0.10995093121514865, 0.62367460451891454], [0.21625862770736737, 0.56655589492104996], [0.87643553881147784, 0.8773528186209496]]])
675            ref=log(xx)
676          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
677          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
678      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
679      def test_log_Symbol(self):      def test_log_Symbol_rank4(self):
680          x=Symbol('x', (4,4))          shape=(2, 2, 4, 3)
681            x=Symbol('x', shape)
682          y=log(x)          y=log(x)
683          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
684          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([[[[0.23606913816015562, 0.56342076719137402, 0.7355680717663261], [0.87353804059814133, 0.063485902161437568, 0.10271601880941661], [0.69910106754486201, 0.58013165276339895, 0.59785507040371511], [0.73249771392271545, 0.94010183482258813, 0.89868933510338556]], [[0.032508796538927687, 0.73590785377602674, 0.15349607539756871], [0.36264001270000867, 0.36714564155514551, 0.41729575745727165], [0.94421837500544636, 0.18274769154072701, 0.68178342629196209], [0.17792389605939896, 0.73275446346331308, 0.81336989984543018]]], [[[0.88744177017241188, 0.85873629930321715, 0.97507712095240717], [0.084433269375262299, 0.15767258573918608, 0.89150470228155243], [0.083123333681785705, 0.041344575544608242, 0.26969215541405434], [0.52934016018314012, 0.8921888927497269, 0.29452686829524577]], [[0.2966879293794692, 0.68861065698170842, 0.22873908069549942], [0.39004287331871179, 0.93321789403503774, 0.28095086798977764], [0.48479875970916408, 0.0080870744933340122, 0.25722147686058128], [0.97747036312105429, 0.50422410526950479, 0.11611910077924759]]]])
685          ref=log(xx)          ref=log(xx)
686          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
687          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
688      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
689      def test_sign_Symbol(self):      def test_log10_Symbol_rank0(self):
690          x=Symbol('x', (4,4))          shape=()
691            x=Symbol('x', shape)
692            y=log10(x)
693            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
694            xx=numpy.array(0.347856708898)
695            ref=log10(xx)
696            res=Evaluator(y)(x=xx)
697            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
698        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
699        def test_log10_Symbol_rank1(self):
700            shape=(1,)
701            x=Symbol('x', shape)
702            y=log10(x)
703            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
704            xx=numpy.array([0.041435179881683326])
705            ref=log10(xx)
706            res=Evaluator(y)(x=xx)
707            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
708        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
709        def test_log10_Symbol_rank2(self):
710            shape=(6, 3)
711            x=Symbol('x', shape)
712            y=log10(x)
713            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
714            xx=numpy.array([[0.99613533442834201, 0.4683193206346935, 0.024821451397177174], [0.88167219799107521, 0.31599217147679737, 0.39303509135374604], [0.44887007561917169, 0.27332757622653436, 0.79270337442892291], [0.34239186333303406, 0.19323987804499065, 0.78415869153051831], [0.49054112456004362, 0.22352684577211168, 0.50058310573313347], [0.69929979685310217, 0.74132037078258828, 0.22229562390649693]])
715            ref=log10(xx)
716            res=Evaluator(y)(x=xx)
717            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
718        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
719        def test_log10_Symbol_rank3(self):
720            shape=(4, 4, 4)
721            x=Symbol('x', shape)
722            y=log10(x)
723            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
724            xx=numpy.array([[[0.006201015687615663, 0.44678418936240016, 0.11393045931762491, 0.14767106517447737], [0.99213395140538863, 0.096701362888215625, 0.080137720753376884, 0.59608969607795803], [0.1649740794847262, 0.17903608781911573, 0.10397487301044916, 0.30005418924408089], [0.57574138095591965, 0.23573768445109666, 0.35364904618770332, 0.42096530998573722]], [[0.72024561052575187, 0.33804080960621907, 0.57653102401096301, 0.7248843873550429], [0.85606455589325414, 0.62016418922318639, 0.4462615181120112, 0.71201191262301711], [0.67680508742469314, 0.85371893356278916, 0.16073018156721397, 0.73575727855696882], [0.43810529714808255, 0.86137706008496795, 0.17135123369957361, 0.27987373944402261]], [[0.12494546604463141, 0.82711569965951537, 0.46782996355314155, 0.4583135033088287], [0.70313230830271423, 0.12411986989392909, 0.026019821690750122, 0.9917446071884779], [0.37601769346192093, 0.056416043973086194, 0.24486536731342401, 0.9094207101114351], [0.80775593784039168, 0.76640871892364171, 0.082564461225778651, 0.9909219110346047]], [[0.55762087607518296, 0.11434716213635954, 0.11905256803251851, 0.97885479463982328], [0.67505546020807117, 0.10600480609003216, 0.43806458676964533, 0.18697697012647163], [0.89314124452818988, 0.5750637566686152, 0.71777337905908223, 0.59664839059582098], [0.8095993172662197, 0.65975557340855095, 0.14346222032468003, 0.24007947476801927]]])
725            ref=log10(xx)
726            res=Evaluator(y)(x=xx)
727            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
728        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
729        def test_log10_Symbol_rank4(self):
730            shape=(3, 4, 2, 5)
731            x=Symbol('x', shape)
732            y=log10(x)
733            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
734            xx=numpy.array([[[[0.12630161878201962, 0.89996556713466591, 0.42786410383579931, 0.83565099350193972, 0.23144752409353553], [0.63962046133823292, 0.8572118529562921, 0.53601185908417859, 0.80535070709505263, 0.30629645207333567]], [[0.96252692319747057, 0.61636453715308437, 0.9480055409457937, 0.25333186178369593, 0.77550344001781157], [0.88550002502802183, 0.9361825771824589, 0.9511182682228605, 0.45184724029617362, 0.64513242672505311]], [[0.49022318290716882, 0.67729168375482041, 0.67631866095446724, 0.46955272976375906, 0.43279848677707577], [0.44242855558558336, 0.68549315295593105, 0.21151455499941452, 0.92290659870445335, 0.14492879817497295]], [[0.13070104049127251, 0.5838089990213452, 0.85816616301035931, 0.86073825457507935, 0.30629314746448877], [0.18323133014441795, 0.086424016332063647, 0.51109084748982037, 0.14245719077571772, 0.28372277013247482]]], [[[0.92105799399164645, 0.90852184208317122, 0.62502604284418739, 0.60271676417111852, 0.19111882573039229], [0.55971788121314858, 0.17485836905254604, 0.18665908062080372, 0.97277265942183933, 0.39506681809633704]], [[0.28205102866253629, 0.72047971630703367, 0.59542884327703238, 0.028041473326696154, 0.16511304563801688], [0.26616654001893381, 0.11870377320527892, 0.39091028504731939, 0.72929439594289502, 0.99080367868098185]], [[0.4330126389822252, 0.34927934897176249, 0.019153599599201598, 0.35264646448457682, 0.66267409670050215], [0.1318303855854428, 0.51823124807672216, 0.31930637393164318, 0.87276276928129937, 0.96900874428805384]], [[0.6730434280285108, 0.44616363447621921, 0.80718331352467687, 0.33019814492634059, 0.96814664924725213], [0.69711513756553101, 0.61710998804286898, 0.023240676334383981, 0.66628263347643346, 0.87564497317581491]]], [[[0.73235461132842761, 0.19731111317567052, 0.85110861781426062, 0.58145787666529214, 0.15054576056195623], [0.3274978042735095, 0.61783337742911271, 0.28384540496239763, 0.2965507103116356, 0.49025440461936642]], [[0.62547415454012301, 0.63983950006797385, 0.1583721566198486, 0.97796734220753079, 0.062392453625810584], [0.30290499227719081, 0.60125638913706314, 0.68557052839218402, 0.24726734150914698, 0.0086339578708469755]], [[0.74371133586238303, 0.47226364511152663, 0.75521616147072423, 0.92612196316882089, 0.82411652724054285], [0.74492714349044797, 0.86746177592359086, 0.61548078178806054, 0.26189309903691826, 0.026071866810553734]], [[0.4989960042228434, 0.031616803663848669, 0.41784801493723323, 0.093906620459975887, 0.50268668408573935], [0.36854161209937919, 0.79104449277469147, 0.22654446087230118, 0.9504670330223175, 0.0088543116805742672]]]])
735            ref=log10(xx)
736            res=Evaluator(y)(x=xx)
737            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
738        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
739        def test_sign_Symbol_rank0(self):
740            shape=()
741            x=Symbol('x', shape)
742          y=sign(x)          y=sign(x)
743          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
744          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array(0.283463886196)
745          ref=sign(xx)          ref=sign(xx)
746          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
747          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
748      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
749      def test_abs_Symbol(self):      def test_sign_Symbol_rank1(self):
750          x=Symbol('x', (4,4))          shape=(3,)
751          y=abs(x)          x=Symbol('x', shape)
752            y=sign(x)
753          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
754          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([-0.65206839399319771, 0.16123474894522061, 0.31321443083699041])
755          ref=abs(xx)          ref=sign(xx)
756            res=Evaluator(y)(x=xx)
757            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
758        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
759        def test_sign_Symbol_rank2(self):
760            shape=(6, 5)
761            x=Symbol('x', shape)
762            y=sign(x)
763            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
764            xx=numpy.array([[0.88946847522358374, 0.60573063296197827, 0.27581900236821921, -0.90138529031484982, 0.15992371094620927], [0.13580313247911491, -0.24716831488142144, 0.74871398327860583, -0.19051451047160928, -0.71631489968178808], [0.35746825856779618, 0.74078012214831768, 0.17591453625719744, 0.8158168087943416, -0.58006166321948216], [0.64170016038862854, -0.95652114189516135, -0.2993781902644026, 0.87735101371959523, -0.31205467318388114], [-0.13629598275355348, 0.87638106543296845, -0.035515856688235647, 0.56818498937810524, -0.32184575724151343], [0.73652802160731357, 0.41007052372594077, -0.24653081237167784, 0.93471365778353666, 0.96929716156982693]])
765            ref=sign(xx)
766            res=Evaluator(y)(x=xx)
767            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
768        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
769        def test_sign_Symbol_rank3(self):
770            shape=(6, 1, 5)
771            x=Symbol('x', shape)
772            y=sign(x)
773            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
774            xx=numpy.array([[[0.12488461619160152, 0.6189256105793064, 0.81731285483651273, 0.057575667673535502, -0.27302024435862116]], [[-0.55747663690651539, 0.67347250923053026, 0.41508716292191572, 0.34438889816834739, 0.82610683849987576]], [[0.13646072589729075, 0.83489005146350359, -0.81436951708774119, 0.27781036711871465, 0.3991299374279853]], [[0.21375415399811049, -0.63387380014580308, -0.89542549288314599, -0.70675150643338536, -0.64199992430266595]], [[-0.911036556223497, 0.58205837805508076, 0.80164541166189185, -0.67139474244321518, -0.62623961848882659]], [[0.98097840038593898, -0.082926027295865623, 0.1127891656366844, -0.72349077652818106, -0.39436533830849907]]])
775            ref=sign(xx)
776          res=Evaluator(y)(x=xx)          res=Evaluator(y)(x=xx)
777          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
778      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
779      def test_inner_Symbol(self):      def test_sign_Symbol_rank4(self):
780          x,y=symbols('x,y', shape=(4,4))          shape=(3, 2, 2, 6)
781            x=Symbol('x', shape)
782            y=sign(x)
783            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
784            xx=numpy.array([[[[-0.88468163251123477, 0.54686693847726175, -0.92320346917053242, 0.78631937221296133, -0.60049132528830529, -0.55265402952790943], [0.53446032202249838, -0.39200963826857449, 0.33247037649691924, 0.79544188664086501, 0.12786248981090997, 0.10523282129499889]], [[0.61258137823621728, -0.89208402152089916, -0.050266914569775611, 0.66900760863608366, 0.63214120871880009, -0.13229885576062506], [0.48184964559024124, 0.087184524958812792, -0.0913268841923911, 0.12665859184636252, -0.78657021543206396, 0.22224173140648817]]], [[[0.33210018626561033, 0.60046207421334574, -0.22716651660805054, 0.6959962401375881, -0.34989442874686771, 0.79820234467951101], [0.19478385839209311, 0.34025166496158743, 0.50781583462850755, -0.68619443174886974, 0.93993273918610476, 0.16862424968148226]], [[-0.29439704342602258, -0.18724048547741856, -0.45916276219721763, -0.091683389584340969, -0.19608978710515679, -0.7964053837696512], [-0.50466497982036196, 0.64079454842159334, -0.79562973298907091, -0.26029213543357077, -0.59329778773248676, -0.2665482276917952]]], [[[-0.48130653789868072, -0.15460459987523367, -0.032036098984846273, -0.35128489317393452, 0.049926793333450625, 0.91512584187491841], [-0.97147039658359602, -0.65743216796947723, -0.98973579088744801, -0.88028686952088853, -0.19036086304104227, -0.046471908881588808]], [[-0.685691683739164, -0.64336976756447606, 0.20036584817567049, -0.93764648998417721, -0.14459089331036989, -0.75280746874026083], [-0.9844449907702093, 0.84495017441043818, -0.60223422426517903, -0.73337110581481935, 0.048300049957334057, 0.48775355162559775]]]])
785            ref=sign(xx)
786            res=Evaluator(y)(x=xx)
787            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
788        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
789        def test_sin_Symbol_rank0(self):
790            shape=()
791            x=Symbol('x', shape)
792            y=sin(x)
793            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
794            xx=numpy.array(0.806494816755)
795            ref=sin(xx)
796            res=Evaluator(y)(x=xx)
797            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
798        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
799        def test_sin_Symbol_rank1(self):
800            shape=(2,)
801            x=Symbol('x', shape)
802            y=sin(x)
803            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
804            xx=numpy.array([-0.14217393239488274, 0.98785912943947607])
805            ref=sin(xx)
806            res=Evaluator(y)(x=xx)
807            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
808        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
809        def test_sin_Symbol_rank2(self):
810            shape=(6, 5)
811            x=Symbol('x', shape)
812            y=sin(x)
813            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
814            xx=numpy.array([[0.53225674215323204, -0.68998376717542764, 0.84868457441180278, 0.48342746462391273, 0.17564955429610674], [0.55367478552571137, -0.78765901356387413, -0.8732643145100536, -0.5600371146458607, -0.25676236704470257], [-0.32231949333211896, 0.67537878999101131, -0.090980870608313502, 0.062022771742478611, 0.11278565839899102], [0.95718861664077748, -0.30494396387697376, -0.11645270873242297, -0.52320089827656258, -0.71003572457652964], [0.19128373204429105, -0.06553710150373826, 0.83023287176575522, 0.54557000559044178, 0.022071814829973446], [0.46052084118436776, -0.97764454609480933, -0.12302854399484375, -0.69757955006782657, 0.74012456453125886]])
815            ref=sin(xx)
816            res=Evaluator(y)(x=xx)
817            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
818        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
819        def test_sin_Symbol_rank3(self):
820            shape=(4, 5, 2)
821            x=Symbol('x', shape)
822            y=sin(x)
823            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
824            xx=numpy.array([[[0.24822193694009465, 0.44324891470959193], [0.25153283214214817, 0.1404613671415087], [0.078333702673272887, -0.39690151889957992], [0.89336829293650521, 0.58031734746220742], [0.4900946171670495, 0.33925702973631777]], [[0.84719425537273696, 0.90048690210002746], [-0.29633596989846511, 0.99757982896602404], [0.8467018261563708, -0.048232109499655618], [-0.67605995795458962, 0.222995756141255], [-0.47168879782172213, 0.54043652948644394]], [[0.29927490968719028, 0.18037839091270191], [0.86077415013686176, 0.62740915158555932], [-0.15579711665760687, -0.087383115973965531], [-0.90421931073758954, -0.47497114414024533], [0.025825625246484352, -0.73630134715961315]], [[-0.95157739871582803, 0.28999808727686438], [0.54347507342953794, 0.35277854141980125], [-0.11330223698164588, 0.36600752673467118], [-0.14861072232300576, -0.67729500099083562], [-0.31329081546740145, 0.78565204313586534]]])
825            ref=sin(xx)
826            res=Evaluator(y)(x=xx)
827            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
828        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
829        def test_sin_Symbol_rank4(self):
830            shape=(1, 2, 4, 3)
831            x=Symbol('x', shape)
832            y=sin(x)
833            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
834            xx=numpy.array([[[[-0.8867015005019121, 0.09130938354044682, 0.92879957810002045], [0.94814781525533065, 0.51668915657752112, 0.36419539008571666], [0.97373776118387068, -0.67878659983133161, -0.70032553538612241], [-0.81394051819612101, -0.0083280562696625982, 0.8733202307122645]], [[0.39097293980210224, 0.58544622088287457, -0.58342843522771459], [0.7301553738025337, -0.89109655451046144, -0.83359606042469192], [0.078436468813519067, -0.8855103441253307, -0.99253480515722781], [0.33545884627727718, 0.087738967766399112, 0.72900775198552026]]]])
835            ref=sin(xx)
836            res=Evaluator(y)(x=xx)
837            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
838        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
839        def test_sinh_Symbol_rank0(self):
840            shape=()
841            x=Symbol('x', shape)
842            y=sinh(x)
843            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
844            xx=numpy.array(-0.331554413612)
845            ref=sinh(xx)
846            res=Evaluator(y)(x=xx)
847            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
848        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
849        def test_sinh_Symbol_rank1(self):
850            shape=(5,)
851            x=Symbol('x', shape)
852            y=sinh(x)
853            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
854            xx=numpy.array([-0.3053529162492914, -0.78017560186562696, -0.93342129385563477, -0.10131598115050711, 0.39330397208564793])
855            ref=sinh(xx)
856            res=Evaluator(y)(x=xx)
857            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
858        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
859        def test_sinh_Symbol_rank2(self):
860            shape=(1, 4)
861            x=Symbol('x', shape)
862            y=sinh(x)
863            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
864            xx=numpy.array([[-0.38237732203172126, -0.55716472432383513, 0.026788427519585767, 0.65437689135115829]])
865            ref=sinh(xx)
866            res=Evaluator(y)(x=xx)
867            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
868        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
869        def test_sinh_Symbol_rank3(self):
870            shape=(1, 4, 3)
871            x=Symbol('x', shape)
872            y=sinh(x)
873            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
874            xx=numpy.array([[[-0.081110017760090525, -0.61386338824980435, -0.44322727115584404], [-0.1383002034650449, -0.60650452780637698, 0.39548715338297247], [-0.01856371117805633, 0.4968247233952412, -0.28195526666504778], [-0.49929933637022583, 0.64395058941351802, -0.94266710031397016]]])
875            ref=sinh(xx)
876            res=Evaluator(y)(x=xx)
877            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
878        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
879        def test_sinh_Symbol_rank4(self):
880            shape=(5, 2, 5, 6)
881            x=Symbol('x', shape)
882            y=sinh(x)
883            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
884            xx=numpy.array([[[[0.43882669357943427, 0.10328282246831444, 0.64960275146936564, 0.23024110897586469, -0.44908755757789409, 0.236968013762338], [0.27575410276805656, 0.22472977038763897, 0.20526996862022551, 0.33941794759212507, 0.98046152178253654, 0.19184527848563637], [-0.8042423489731072, -0.10462264882909023, 0.49528872848968208, -0.62927275980586117, -0.41483700956105585, 0.98739265029963996], [0.51494400234783333, 0.70839810802096781, 0.72184141680583336, -0.95372448212767424, 0.59905028145913941, -0.54332072168996826], [0.23809081343561478, 0.35120670692286415, 0.50295899965885016, -0.19331314191057847, -0.3717320350230322, 0.66330287250223274]], [[0.7342226979017572, 0.10340753905504574, -0.1480789370010156, 0.56801961069810503, -0.75117099921009989, 0.18392002163889787], [-0.35053941569940772, 0.30877287733153125, 0.080952916029684463, 0.50935555022917578, 0.54952646654099513, -0.76914561892960198], [-0.95921388984505063, -0.35491997450632606, -0.56996125939420073, -0.3011568029301257, -0.60397025573818053, 0.76762761779426092], [0.89000022668951773, -0.23410218933315008, 0.30384508903724239, -0.39213632654672881, -0.62998002223313421, 0.82577362735204329], [-0.46458976005833286, 0.052794172992126187, 0.20567475802508528, -0.1329275100142131, 0.66406468229778803, 0.25138985582508089]]], [[[-0.99240817414124693, -0.18510730665105912, 0.43763073044873857, -0.57335605216547747, 0.49995833515783095, 0.64039747704390315], [-0.23822501431410315, 0.54824513333397307, -0.65236158639278496, -0.24888604686359672, 0.51698477524568043, -0.45073123862350584], [-0.49956517947575452, 0.97618112281667302, 0.16234544737689949, -0.42575675612930164, -0.3797684474279206, 0.91342076568702146], [0.032905888238467851, 0.36098371345848834, -0.53539200235021234, -0.25860071269316198, 0.4939047737229374, -0.43898276363865096], [0.84985581832986834, -0.33526812975156517, -0.64639167522558072, 0.19795136296970006, -0.94791419981984393, 0.8608277140547036]], [[-0.83505340588281718, 0.95916518455496469, -0.28962110056720336, -0.57710674386264849, 0.64659386519547413, 0.61006163511572331], [-0.71722304724963681, 0.2399839181560699, 0.60883136789783454, -0.52625706526781002, -0.58977296606778107, 0.60651799551253283], [-0.092865341267572177, 0.1808706356060179, 0.57379396990025655, -0.44800437849006514, 0.43436390279457471, 0.069821885057861355], [-0.45866641969877797, 0.073423971971385393, -0.91916012134924929, -0.14371158970924913, 0.12650637655764063, 0.41949523803526167], [-0.16249695382867402, 0.54343832521984869, -0.27150191477396501, -0.70720770655593368, 0.73012244133363091, 0.48200524546831347]]], [[[0.14051555052239584, 0.068685178417353443, -0.63209077205364594, -0.25469845942084723, 0.69653348115906266, 0.18298338450665574], [-0.45378403194132932, -0.50768390372974803, 0.14147901088140769, -0.95370972601137516, 0.0010717481920834437, -0.8277077976242746], [0.096767094825636724, 0.23120876113510058, -0.077810429896721267, -0.31436446927299477, -0.0024680072837244271, 0.36386771694199238], [0.57445016315892783, 0.38932381359760648, 0.33537169376028864, -0.032127364338354614, 0.83928736707680485, -0.84814295801457074], [-0.96161550856334665, -0.51598304960450281, 0.78264941017017708, 0.31645269870291903, -0.95224749591556401, -0.44707647210992651]], [[0.89963568108709357, 0.92622380845038577, 0.324976841049194, -0.40309130398802639, 0.32916288680527273, 0.091630446131983456], [-0.97312897646438068, -0.096211189571948186, -0.21959652246609784, -0.16571702008699063, 0.92006917324691306, 0.22366149577001448], [-0.18733557240291798, 0.33531831728503625, -0.35422464084056182, 0.69667812569709664, 0.26396570854498203, 0.95669062865555232], [0.84876961864794542, 0.79249936339962579, 0.83473013506265903, 0.76474546722972891, 0.07713103251627107, -0.89823562202733398], [-0.52018690611640772, 0.5174728094772012, -0.77227167120387508, 0.99271630771937902, -0.41223288162895888, -0.24442047718999027]]], [[[-0.32361574747647714, 0.81995361746060325, -0.12230280810166305, -0.52917945359511331, 0.17521483495045298, 0.31938310243794565], [0.36089632717507869, -0.30276737149979649, -0.29388077306946747, 0.2481460794501138, 0.76132294200623241, 0.67850279313504225], [-0.22828000065777365, -0.27018716464652281, -0.49121596518502719, -0.83733491161314944, 0.62275130677031343, -0.77593702798632203], [0.3671187973442267, 0.20077385258283553, 0.15469295267129657, -0.41198141650257414, 0.47250078191960454, -0.90773131568231946], [-0.49278928850502379, 0.99395699886665012, 0.42426333721302245, 0.94490417019432216, -0.84154085311461713, 0.61225735328558639]], [[-0.53838341008728885, -0.19889850014600685, 0.78551680521033718, -0.72528328293653233, 0.35387389562237126, 0.76618770529281233], [0.73593157267729303, -0.093280754186395143, -0.94598773880603648, 0.30184845201099564, -0.55192839465686339, -0.55314176684546812], [-0.069319186450431003, -0.34846128951234756, -0.035534102171722148, 0.80991061185957425, -0.63423383121369548, 0.17612646461258197], [0.77672752351153052, -0.69325933254394023, -0.76082288979630186, 0.61134868832854239, -0.96677254387836631, -0.053956585109321331], [0.24420783988176042, -0.96635016252449857, -0.76141533064692268, 0.83573310980105564, 0.48527918281051874, 0.66940527732713639]]], [[[-0.016056819708793579, 0.05846564777572727, 0.15382201003795282, -0.77323335366925239, 0.26344340421912826, 0.20419390916838442], [0.096386288975591761, 0.10303361060009042, 0.5435628606532934, 0.81626036916225009, 0.87755498312375724, 0.43695961077954815], [0.3529532389445833, -0.24938866723774411, 0.85829827162343042, 0.51877324901443322, -0.56515654392821202, -0.70070979640802866], [-0.98674675104937593, -0.079516974601082646, 0.92262600789785387, 0.25785405107861781, -0.53054775860423375, 0.26557881460186383], [-0.58610461614109277, 0.77394001645663746, 0.073960951904489924, 0.95570337141849171, 0.44490106702072163, -0.62402158681407305]], [[-0.56319673268175818, -0.27626244901632191, 0.39032403922220937, 0.72527473091644601, -0.096833362196748318, -0.46134881399913241], [0.23733352894982018, 0.99927215082753262, -0.97128036672383944, -0.4724667257239048, 0.74392211358098903, -0.36014367071114628], [-0.73597441701035748, 0.43624964134381816, -0.7390955605045455, -0.40953687871499178, -0.45218870613448559, 0.97465237874657351], [-0.88902517569426265, -0.088406896409418678, -0.04987338649640205, -0.98143819739671434, -0.047189500198992818, -0.74972817013366444], [0.80140223281065714, 0.6182003516473471, 0.7492002957505739, -0.29373320137457726, 0.47218345679351037, 0.47796707647370762]]]])
885            ref=sinh(xx)
886            res=Evaluator(y)(x=xx)
887            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
888        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
889        def test_sqrt_Symbol_rank0(self):
890            shape=()
891            x=Symbol('x', shape)
892            y=sqrt(x)
893            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
894            xx=numpy.array(0.324754721187)
895            ref=sqrt(xx)
896            res=Evaluator(y)(x=xx)
897            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
898        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
899        def test_sqrt_Symbol_rank1(self):
900            shape=(4,)
901            x=Symbol('x', shape)
902            y=sqrt(x)
903            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
904            xx=numpy.array([0.26765040678341656, 0.3670450357457814, 0.69625872066949546, 0.20660457878994687])
905            ref=sqrt(xx)
906            res=Evaluator(y)(x=xx)
907            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
908        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
909        def test_sqrt_Symbol_rank2(self):
910            shape=(6, 5)
911            x=Symbol('x', shape)
912            y=sqrt(x)
913            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
914            xx=numpy.array([[0.39123344388578152, 0.77925870517465323, 0.81623659466290022, 0.12292660142884382, 0.9566707586441916], [0.29000447581476985, 0.38464635072721609, 0.57924289966184273, 0.31131191936027958, 0.95911423129493878], [0.85833016474457213, 0.11640473799511308, 0.42653779443263717, 0.43959782523188329, 0.374879056191043], [0.80564150338609053, 0.55545292124627588, 0.99471232891452244, 0.49832333085839509, 0.52017131224963786], [0.14394178787944423, 0.82967265755312047, 0.8678088666738597, 0.92372546207662254, 0.74985872169491541], [0.96103757190914707, 0.24109533933857896, 0.94424788590672748, 0.29272372275813874, 0.17199419761767942]])
915            ref=sqrt(xx)
916            res=Evaluator(y)(x=xx)
917            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
918        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
919        def test_sqrt_Symbol_rank3(self):
920            shape=(1, 6, 3)
921            x=Symbol('x', shape)
922            y=sqrt(x)
923            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
924            xx=numpy.array([[[0.006956941817839235, 0.29305982046215495, 0.93320915199121557], [0.93126622200125386, 0.45072320950811529, 0.57387646451660779], [0.72434228872747741, 0.052142552639607653, 0.93903764376119325], [0.33089502563435591, 0.11339428485719194, 0.18116785713131234], [0.66134066764255994, 0.3916991362196971, 0.73782436057543899], [0.86297287075424189, 0.94344810257283318, 0.27367944724197735]]])
925            ref=sqrt(xx)
926            res=Evaluator(y)(x=xx)
927            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
928        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
929        def test_sqrt_Symbol_rank4(self):
930            shape=(4, 5, 6, 5)
931            x=Symbol('x', shape)
932            y=sqrt(x)
933            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
934            xx=numpy.array([[[[0.55285492440574346, 0.12272346421938074, 0.19809396758149922, 0.67563062021988296, 0.67819572129598971], [0.50280495937824543, 0.19040156891583793, 0.04451067860262492, 0.67460872086977541, 0.44505281493221172], [0.1903318039998888, 0.41627350239471794, 0.25849619931511836, 0.65713026293291621, 0.86054540958496362], [0.43488260556157321, 0.53096076820345173, 0.52418070767052793, 0.47023812013538502, 0.50124299423405727], [0.44298194441721872, 0.58501579242875479, 0.52466011793638245, 0.40957892657450568, 0.50168987300141155], [0.075078619118925549, 0.82278287951399975, 0.14070153523377504, 0.51856125272219789, 0.19626780135687982]], [[0.89005739734755895, 0.75645442133347718, 0.31581744176190285, 0.60581329421168384, 0.71971278721687537], [0.63084595673894672, 0.97223912394898171, 0.76383167696681031, 0.96300275765324816, 0.23427465724513785], [0.53420972515275111, 0.44967637928701754, 0.11331199490504062, 0.62534307168822856, 0.83010604586092429], [0.60697120450339503, 0.70165718295391744, 0.6963045619946997, 0.27651195621349911, 0.40470093262855655], [0.7665088742781434, 0.84019683664239575, 0.30756798072314007, 0.65882676010542107, 0.42701976897813299], [0.03992494531691948, 0.70036622106918811, 0.10378974220587422, 0.6883671495399416, 0.8051906140183438]], [[0.99143973319057321, 0.7249984147539883, 0.54149103357365902, 0.10783120197533347, 0.97075036364341882], [0.81791193163033216, 0.50010243155047673, 0.73665907801513852, 0.68906867683412198, 0.13914788314910242], [0.19732409837636466, 0.48185513366399635, 0.17094637292200798, 0.021340043804290665, 0.54646478557656042], [0.75197911240393089, 0.7313284812230938, 0.61170514580562296, 0.66442064050366323, 0.142246040820176], [0.23520285530330076, 0.63924045879403901, 0.11726750346026893, 0.54883881498541753, 0.91426185183741604], [0.93631011726573998, 0.0185817733152841, 0.96133443589010914, 0.85298475679123364, 0.96881610347253755]], [[0.45717466610244539, 0.13973837278938117, 0.028321023772876819, 0.45151126687218279, 0.87996786479253597], [0.51181134445738008, 0.91664515660277657, 0.8711313226781785, 0.19796978611718952, 0.4342094218132192], [0.63294016274943521, 0.44500412521936483, 0.32095577843772194, 0.28975016578014323, 0.39415187962921183], [0.17323750096228452, 0.92275442417946529, 0.89524793104477973, 0.19933379431262599, 0.87450721530204489], [0.95617000972686739, 0.59862648702369436, 0.40572614976291399, 0.26215060541026614, 0.032604602318369369], [0.50286544842892777, 0.56698748582321368, 0.77525055648935304, 0.92806964806507641, 0.55601353856636826]], [[0.78690936272061662, 0.094472311253335328, 0.20200644008963209, 0.30464108375591914, 0.43930278146561275], [0.679773534180102, 0.71813417858669659, 0.24236953206257839, 0.61100097141709797, 0.56777474519615623], [0.0095199796167556583, 0.94539663777177863, 0.4788075506551448, 0.50279535075344139, 0.39169893439131109], [0.5589868267516459, 0.95510645932366611, 0.98429028624649961, 0.69783665543605189, 0.75641833167224237], [0.16264979652924594, 0.56092613094525801, 0.56151990693690879, 0.28733522372846776, 0.42279278130525011], [0.13116952178535568, 0.53045981668470032, 0.24860564448906131, 0.53784408374176595, 0.32270358468096727]]], [[[0.37911131657385766, 0.68814408512489944, 0.59426706658053596, 0.65030728980799801, 0.49497680076744388], [0.69849961271456085, 0.19286345224320167, 0.18114249676525918, 0.57430816174712607, 0.006044527705213687], [0.28148378769108728, 0.4525207442615844, 0.63263311972014658, 0.31181887461037849, 0.72602573090722688], [0.20072723368710421, 0.77224544804322903, 0.54391891216775368, 0.30033594405410757, 0.21739003547546987], [0.30674883930208485, 0.76468667958622538, 0.36986980632220423, 0.14405179038713334, 0.29665806516029991], [0.10856555222095954, 0.77829531844601618, 0.75486401654950597, 0.51920979596057093, 0.79072030486040035]], [[0.91673281367929982, 0.80060756439277048, 0.24804971460149161, 0.64767498652658728, 0.8103361562491056], [0.95668875950077115, 0.49224455242555587, 0.069073987956172922, 0.27888934729357229, 0.29715966662087467], [0.71544168889661852, 0.15052398804879608, 0.83829619923392251, 0.5160258275245887, 0.036750807746295244], [0.79495083467398098, 0.069178879222830503, 0.74764005719955939, 0.66963739731033123, 0.53360050458079689], [0.62534121322332892, 0.27047062749192929, 0.084118215341789648, 0.37383332313288753, 0.77964211142608986], [0.18044340598049036, 0.33414685030260649, 0.44566818859718516, 0.72393118752265861, 0.42735370331799549]], [[0.4268803548294634, 0.24817120111778379, 0.12645007420528653, 0.85861644771869028, 0.0083288559684939756], [0.69794114912338368, 0.49247898252941136, 0.16226215916277564, 0.86803043021745419, 0.091357939070778271], [0.21597347239310838, 0.91256858783472938, 0.81042502780584647, 0.28643269019514384, 0.19134919615064572], [0.37036877008945357, 0.46284691378661447, 0.077276230604462537, 0.13270844844927487, 0.8636255866901914], [0.46219292790232336, 0.020892426422982058, 0.6786532414899521, 0.65564581704796998, 0.75684195869666593], [0.91317174832955716, 0.2236897749504434, 0.54155823407878134, 0.51752528752505611, 0.18632782756953437]], [[0.66937820737832043, 0.64793803152642515, 0.92369132814024235, 0.56664527855577207, 0.74424791457164763], [0.53649755150751488, 0.042680001948998458, 0.60056154502067971, 0.82193992105377633, 0.66020161624970763], [0.55396341277218764, 0.043719679352173801, 0.64216199879896607, 0.50712638731391635, 0.36563132256071795], [0.075580580838256806, 0.74318861082390897, 0.75826916553948887, 0.52873045857699019, 0.42324253436074766], [0.10482768441057788, 0.41801794012233473, 0.49655011327871657, 0.40256180145053122, 0.32905789183980128], [0.77034277281473618, 0.8322021701862713, 0.16212329012853999, 0.71878735162984686, 0.94372589280665897]], [[0.64070101133896162, 0.93456323310944911, 0.56979743163865737, 0.017891232679781321, 0.40012339763846994], [0.8718714334972415, 0.56360823772777768, 0.52764608244609545, 0.38231732960691656, 0.22333934717457837], [0.90903342229026107, 0.7976115927597931, 0.85089965527783928, 0.3874547104610303, 0.65527303810485071], [0.32766893602173286, 0.058210756284301057, 0.51861584518977788, 0.94337195896994541, 0.17035972533879851], [0.34750774986739608, 0.8788648873913546, 0.045860238859674607, 0.15574352207329156, 0.065986201662222688], [0.99416863365597585, 0.28677443200727926, 0.66332017016923694, 0.12988430934045059, 0.6710709144744087]]], [[[0.47130967877340124, 0.54556716340943123, 0.52571205290424294, 0.42958145759406918, 0.24928622795648847], [0.75544044515982711, 0.048729589278721508, 0.49366586083954067, 0.78313338746474148, 0.74033724400120837], [0.12628001241383269, 0.80730428989306313, 0.6935357151584336, 0.91793483934408915, 0.46346827962108339], [0.92023200109674164, 0.56898149527329178, 0.69859935951646035, 0.51020774574677463, 0.19276291590604566], [0.18245287864733251, 0.50392192133904312, 0.60129876694933171, 0.52894853154415045, 0.098245180230596252], [0.12087398747235856, 0.95251208021655376, 0.81672320847322744, 0.058994977700454254, 0.76315156741920109]], [[0.07563973642515931, 0.76152111149588686, 0.083779496080239046, 0.2752433860683412, 0.61098551191138628], [0.8848842963384308, 0.36782294182700093, 0.93530563734367056, 0.4127456365688823, 0.47155411473949815], [0.25976136094906688, 0.34034136194074971, 0.44577265913307917, 0.86524059832837963, 0.73105542595504169], [0.81310742454100049, 0.20173973196857398, 0.64154520306729679, 0.72221614121010413, 0.3588151800636159], [0.10859288526616995, 0.51892863416592716, 0.48473895237876896, 0.86742593491959286, 0.39022670963868367], [0.50338182197612691, 0.4969457826840562, 0.80656446987505725, 0.12254426719497624, 0.53771101720712799]], [[0.48594265867394359, 0.28490946743828816, 0.59902090014061904, 0.011092916359254024, 0.44491468446271176], [0.52649931432718367, 0.43310609091052898, 0.12027077267283615, 0.7996261768256594, 0.95060255711711039], [0.760955180126205, 0.22001564710737986, 0.9359947987106112, 0.40531804451578801, 0.44173861096542832], [0.71400893927026288, 0.88543395178869899, 0.83496449122977889, 0.4247264466626518, 0.94363179783472273], [0.036240679610319626, 0.6716127543267103, 0.0678550574175526, 0.5412790648931276, 0.17591101486431049], [0.03659774832101137, 0.30023860664002777, 0.84845281021808516, 0.13514802709294227, 0.72313158717929038]], [[0.78359103745818082, 0.52937691541016418, 0.82467016599788301, 0.27963664482426365, 0.02543866279484408], [0.4146290803842021, 0.17668974597769183, 0.66733827473072671, 0.87717042290343283, 0.55864053463632046], [0.77109867354027373, 0.27004527882091789, 0.10551234184999081, 0.12926419679756762, 0.53155154887116551], [0.014891074565827833, 0.19092272523170006, 0.42961429182301569, 0.06954710771177397, 0.88203836199389851], [0.23939104863945371, 0.35402799385561678, 0.59078891700771219, 0.29689283122728782, 0.92667785743441999], [0.65457885959430095, 0.0072033926110202096, 0.39745189518696689, 0.2224741059460501, 0.57902548991666314]], [[0.1291495204517713, 0.42505931174684775, 0.15994918002572189, 0.62402640758634487, 0.34657141334922192], [0.73211599712569997, 0.49401940364794739, 0.36995691848591583, 0.369084296351879, 0.97090326829339169], [0.75876321540952141, 0.84447544172242273, 0.88263174226002339, 0.86536292299069195, 0.29011426626974823], [0.38683705549875602, 0.0046150930931951883, 0.44779143235224739, 0.84666514514703406, 0.6984081051707961], [0.9154101980296161, 0.37022043916095615, 0.80066709173520956, 0.57764494429328239, 0.70137815571497064], [0.13582441582943128, 0.76433686009888224, 0.55481172570212378, 0.86065956322024684, 0.058751389799687526]]], [[[0.59700651439631713, 0.37900624083826639, 0.4383950958398467, 0.62708482910601393, 0.79684982847683605], [0.25744365023162696, 0.87076909453037987, 0.76100993184277321, 0.098781437724697385, 0.059971529596641315], [0.67910636852601536, 0.082662204786920324, 0.65296802875534332, 0.50192247609098961, 0.45449598142485825], [0.91180916905274256, 0.3976084571989893, 0.96157860372179649, 0.37001533804714204, 0.13777544869517189], [0.23969545416096427, 0.15455866686662689, 0.68781060114832182, 0.62316492031167003, 0.34037529483144702], [0.10365144292652706, 0.26090369924082346, 0.20458360582808255, 0.19016578889385127, 0.59343597825449268]], [[0.54913491311703455, 0.28137392413057039, 0.59146349215875149, 0.739668667511864, 0.79475964498951723], [0.18481901031012893, 0.29325244735946554, 0.21330516126356647, 0.152604987204638, 0.69362599490043197], [0.42931391588102163, 0.99602833978342087, 0.26274094305084528, 0.34749128792610795, 0.10636626128140947], [0.39805615850371456, 0.17577666447179729, 0.70710210465115342, 0.061734001915777714, 0.40061737810054976], [0.22073162600902863, 0.5807149467961219, 0.074854664456721398, 0.78432163548433997, 0.19717720993474341], [0.51114322470912221, 0.79750168195866711, 0.58006197645054802, 0.24472886192346954, 0.57135921547676471]], [[0.72827510180405153, 0.95702447576331839, 0.22751787296867787, 0.11780172663929089, 0.60226771693512715], [0.96388626642307007, 0.14422548546049452, 0.74658095641866307, 0.43116731264172736, 0.23105498423239834], [0.039045576321047659, 0.41751724395179579, 0.56511281663024804, 0.65709153190187242, 0.064652283408664468], [0.75648109580620915, 0.8320409186846216, 0.99841918470667423, 0.36247538149515934, 0.39704846851212583], [0.98928540046633107, 0.89294223301975795, 0.8173569975906716, 0.71367892691783363, 0.82770146425993141], [0.080488051038823949, 0.43135717256400774, 0.68501705768086874, 0.59644775911512371, 0.24622163877490622]], [[0.073492675775364114, 0.32543713604663815, 0.90821182975443915, 0.41006503608209699, 0.83843414388657711], [0.41570579143758013, 0.43925478909657256, 0.93984319679959138, 0.72781014381492981, 0.46411963156024127], [0.78595820579692532, 0.34919346886774105, 0.33397884712690529, 0.94987594148808951, 0.4984996944028528], [0.25306085809636969, 0.88761651548439569, 0.96737836098015773, 0.89196063152205218, 0.86115472659397985], [0.35980052598383894, 0.97922617876481088, 0.30517620063196904, 0.86080848916655051, 0.41122497124921231], [0.9758010467213889, 0.59647496871665551, 0.81577906936325706, 0.66660746496263967, 0.69792587311654375]], [[0.64739575677351535, 0.67643037334681344, 0.4803202913823712, 0.84496483489538887, 0.52443417916472379], [0.11167446937854819, 0.87944703980505334, 0.014492079577805073, 0.29270382595446975, 0.41524938874287931], [0.42049768623106221, 0.1710237855228286, 0.71531637398216819, 0.57298612799994886, 0.42981138551832365], [0.05551893331378821, 0.8855402324130679, 0.55463233287312597, 0.99108105873351537, 0.23226978900715345], [0.11045838710289069, 0.43061809865794887, 0.40680473711890197, 0.3581737566378369, 0.87575657668564455], [0.83245157242836543, 0.29173332668606278, 0.8291135410185313, 0.49424282955872978, 0.6898978370358525]]]])
935            ref=sqrt(xx)
936            res=Evaluator(y)(x=xx)
937            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
938        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
939        def test_tan_Symbol_rank0(self):
940            shape=()
941            x=Symbol('x', shape)
942            y=tan(x)
943            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
944            xx=numpy.array(0.209431554652)
945            ref=tan(xx)
946            res=Evaluator(y)(x=xx)
947            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
948        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
949        def test_tan_Symbol_rank1(self):
950            shape=(6,)
951            x=Symbol('x', shape)
952            y=tan(x)
953            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
954            xx=numpy.array([0.087459774368441545, -0.88362288797089894, -0.54141058334280379, 0.44445104551816317, -0.20598166278729702, 0.68758381229809062])
955            ref=tan(xx)
956            res=Evaluator(y)(x=xx)
957            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
958        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
959        def test_tan_Symbol_rank2(self):
960            shape=(4, 2)
961            x=Symbol('x', shape)
962            y=tan(x)
963            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
964            xx=numpy.array([[0.46244835934413642, -0.60213655324014148], [-0.614826816992045, -0.78435323722775196], [0.79124199720985944, 0.73024320439185098], [0.45160570625779739, 0.62738382412832805]])
965            ref=tan(xx)
966            res=Evaluator(y)(x=xx)
967            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
968        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
969        def test_tan_Symbol_rank3(self):
970            shape=(2, 1, 5)
971            x=Symbol('x', shape)
972            y=tan(x)
973            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
974            xx=numpy.array([[[-0.37949327463382065, 0.97777493210736099, -0.66970147362567456, -0.42239025073075576, -0.53033755445058306]], [[0.57247188863347498, -0.8990533608911957, 0.047681221330614143, -0.014696168429957357, 0.40184951938025848]]])
975            ref=tan(xx)
976            res=Evaluator(y)(x=xx)
977            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
978        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
979        def test_tan_Symbol_rank4(self):
980            shape=(3, 3, 4, 5)
981            x=Symbol('x', shape)
982            y=tan(x)
983            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
984            xx=numpy.array([[[[0.016523868628697702, -0.48434049208294239, -0.56647991631922334, -0.84831626392976212, 0.51502679792223138], [-0.60570805853789511, 0.037722830986585576, 0.96989229884818595, -0.20230137231148526, -0.47784990773149083], [0.13592059169019821, -0.20149754586470636, 0.48171767818369982, 0.21960272689160543, 0.21877165002873245], [-0.13934254900260679, 0.30257948731520812, 0.88764119574498257, -0.096532573578287817, 0.72601896867517945]], [[-0.62174630323546154, 0.88222676409748235, 0.56498613392288366, -0.97820629783913327, 0.63108058329898298], [-0.77746977497481651, 0.4180248039804233, 0.18838813888814809, 0.87588596660917895, 0.24791700301521358], [-0.29494128890981175, 0.25481870772884085, -0.049896899566068464, 0.39284871429459778, -0.87714468356817532], [-0.70518206792335225, -0.62906775964089645, 0.9013363710777782, 0.39204287929397696, -0.56388639366879589]], [[-0.063128617158787259, -0.24816146231876623, 0.91928772670118497, 0.32368275530493307, 0.37445544897257022], [0.20519262449423969, -0.63876427366981914, 0.20149475988318688, 0.76984861095210921, -0.94064159955540871], [0.41838839953481766, -0.64857075496824024, 0.11861207036725796, 0.4300943982511034, -0.89375563929746482], [-0.74094699423662158, 0.34122989373523493, 0.57379304083431704, -0.090694314588586566, 0.61867811344828572]]], [[[-0.76535300013881291, -0.90254398019038939, 0.88550970827858566, -0.15239018540377836, -0.042461205838450589], [0.027734698700162319, 0.78432037486314821, -0.54537461825168121, 0.33208868259748137, 0.70137585916999634], [-0.46812345713659886, 0.99685229144667753, -0.15080600423579549, 0.33827818315688374, -0.92970522388393162], [-0.51329322549139578, 0.50356793850319836, -0.98109639608445565, 0.089231102505273441, 0.87806674212546576]], [[0.91837396348565803, -0.5874205454607575, -0.31454032819420719, -0.3950175126433022, -0.8338964066472947], [-0.12213078919735332, 0.22455947519186492, -0.2603419245094698, 0.7692864880244592, 0.8959035965351152], [0.8853681803370903, -0.85348466701042724, -0.51106497109989402, 0.022811537184894926, 0.30919168506411343], [-0.34445259067825229, -0.39729749709780648, -0.89633094607723685, 0.59090722985808086, 0.78862377201359002]], [[-0.90004490380479019, 0.81922126411896268, 0.55395134262610179, -0.32172924988048934, 0.12580584070235323], [-0.65435443482541489, -0.027830814722005659, 0.023038353227855746, -0.95478648041454361, -0.76834909511218052], [-0.54015543531580601, 0.55484250948900682, -0.7766293710211476, -0.89159810705019282, 0.56087264784917612], [0.096027187660024493, 0.25994465807604938, -0.27738713834370676, -0.64688839309231483, -0.2803770450874703]]], [[[0.9143648453151807, 0.27798366188429013, -0.72302339747965116, -0.29818641119607414, 0.6355549949917414], [0.35449455389651319, 0.16702398513117589, -0.26594743792438158, -0.10142534797754998, -0.026247979607276317], [-0.53144279316320109, 0.31428042708281922, 0.75212378470042451, -0.24652504145251619, 0.89858823981516234], [-0.18595877691109153, 0.048758658389440823, 0.30749542860004198, -0.27457046073349134, 0.26278559983322136]], [[-0.17996741282847539, 0.78020335085726367, -0.69683327825391062, -0.27132269074593207, 0.78982789141886678], [0.15423943345644875, 0.055001356625384856, 0.81474689695595326, 0.17411703478818796, -0.53447205466406023], [-0.20967779302208989, 0.49105909194915998, -0.032841509796083246, -0.7963541588730163, -0.9173065936725755], [-0.4494655161405634, 0.97613962051343117, 0.84356459146059204, -0.83054692320876922, 0.73243126006409964]], [[-0.15175209363706155, -0.50413450514478253, 0.87306192753381739, -0.43928328987109144, -0.7170121622054384], [-0.79315793580940563, 0.39543398442409394, -0.87602622732764845, 0.9969736877248867, -0.79950316251025022], [-0.44653947999442334, 0.97771130232405645, 0.12985556243026863, 0.90499036232453745, 0.020864326387190157], [0.65229720363292976, 0.10402546217032915, 0.38524481591731763, -0.80725593164399068, -0.59227904096566952]]]])
985            ref=tan(xx)
986            res=Evaluator(y)(x=xx)
987            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
988        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
989        def test_tanh_Symbol_rank0(self):
990            shape=()
991            x=Symbol('x', shape)
992            y=tanh(x)
993            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
994            xx=numpy.array(0.0895031360188)
995            ref=tanh(xx)
996            res=Evaluator(y)(x=xx)
997            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
998        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
999        def test_tanh_Symbol_rank1(self):
1000            shape=(4,)
1001            x=Symbol('x', shape)
1002            y=tanh(x)
1003            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1004            xx=numpy.array([-0.03942823196209555, 0.44240619348950116, 0.60903701416297173, -0.6322868753747255])
1005            ref=tanh(xx)
1006            res=Evaluator(y)(x=xx)
1007            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1008        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1009        def test_tanh_Symbol_rank2(self):
1010            shape=(2, 3)
1011            x=Symbol('x', shape)
1012            y=tanh(x)
1013            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1014            xx=numpy.array([[0.48033344694283575, -0.77316270562335232, 0.1961889804438488], [-0.38302772872530122, -0.15416061092058331, -0.095255143613632409]])
1015            ref=tanh(xx)
1016            res=Evaluator(y)(x=xx)
1017            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1018        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1019        def test_tanh_Symbol_rank3(self):
1020            shape=(5, 6, 2)
1021            x=Symbol('x', shape)
1022            y=tanh(x)
1023            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1024            xx=numpy.array([[[-0.48991993613930673, 0.45148833883670503], [0.17986679483825152, -0.56148640444768749], [0.10846503544539554, 0.78439681273383721], [-0.81950414727643861, 0.89292033850565677], [-0.26788254352267682, -0.99424607225283146], [-0.72115470268903992, -0.916918517052697]], [[0.15313022995148162, 0.097958948605906704], [0.19075616748722357, -0.62006956355006304], [-0.85292852041937417, 0.76781326742253952], [0.53495974911605249, 0.091942821722821533], [0.36183570233097928, 0.67994198720392429], [0.53794800022545264, 0.22863201815005563]], [[-0.90240208421951174, 0.051089929924245769], [-0.6997052834174422, -0.20292449300013593], [-0.96942219664880169, 0.89059411138718425], [0.53332392617514546, -0.10937060992151393], [0.86334193486358779, 0.95366437684189753], [-0.8780230272610865, -0.041804960655301482]], [[0.018383009908785608, 0.50371792592114373], [-0.73648479510637088, -0.70349105225638353], [0.96134123460371401, 0.12315467759090271], [0.16700366796927502, -0.5952708699611462], [0.97114278652713559, -0.089945196008888839], [-0.3758037187357437, -0.2719325141576876]], [[0.79517266942638698, 0.37550983871905541], [-0.35080975429947814, -0.90336326812446832], [0.87769377191771714, 0.73681429937417375], [0.33458594823211474, 0.25832474340863998], [0.2841368287368391, -0.084636954922058916], [0.31403006670409295, 0.14061625585097515]]])
1025            ref=tanh(xx)
1026            res=Evaluator(y)(x=xx)
1027            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1028        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1029        def test_tanh_Symbol_rank4(self):
1030            shape=(4, 2, 3, 6)
1031            x=Symbol('x', shape)
1032            y=tanh(x)
1033            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1034            xx=numpy.array([[[[0.2007647147286189, -0.36779568268162932, 0.880954622296934, 0.11541479547181877, -0.76825576891361358, 0.43277202041394669], [0.20646951501409405, -0.84710271899542078, -0.71725722417498328, -0.59091677659736797, 0.12974922177419401, 0.072285882570669591], [0.55013338476453444, -0.66003988686493464, 0.68024731477206424, 0.37807441598125413, -0.34484336898064627, 0.54929116942719181]], [[0.42075442335530022, 0.24353754710239639, 0.35394349912855905, -0.21087905587080691, 0.98309916334374758, -0.11450682735555273], [0.32288463099681919, 0.33374973031198785, -0.40914670185158131, 0.46492834573223352, 0.35753507374893201, -0.28646087447145585], [0.84084631077844207, 0.77799147060731944, 0.78012785917464145, 0.79613219845230376, -0.98003444169991716, 0.69924675827076688]]], [[[-0.2001417236884242, 0.065071808801404174, 0.92387374650596965, -0.45855948087890708, 0.81462751243620324, 0.60324364129474017], [-0.46212754053958682, 0.90238397776050516, -0.99191128914335169, 0.59751667404250752, 0.55219251789461632, 0.23551110389285901], [0.35430522224769279, 0.096151151599375595, 0.37405526115221499, 0.48612293463219336, 0.61822611771390723, -0.94492862031250158]], [[-0.53047952235644336, 0.63117915760144316, 0.84907360954501998, 0.67453434005440638, 0.15307060620124235, 0.21096044583112872], [0.44866045532141596, -0.001041113712782149, 0.84681263112002569, 0.4189244083383199, -0.77187833709672971, -0.21181739011218448], [-0.65462029434690749, -0.19357931410568918, -0.82682241038266868, 0.27264466788297459, 0.83010481702092709, 0.64367422330717838]]], [[[0.87595588770865773, 0.78750815313190858, -0.57922806165604235, -0.18522770307877301, -0.31119908807705121, -0.13800629222649352], [0.7184218918449834, -0.34124220274873829, 0.37676089153054271, 0.25302442165966443, -0.50961581925437116, -0.11141267929901577], [-0.71707858159475713, -0.86407459730107194, -0.42374296346995255, -0.00015208210731265659, 0.85517772348987764, -0.51204311661644142]], [[0.874931179775567, -0.30957304077351444, -0.92597849655351583, -0.69141259803864719, -0.85742794186797089, -0.64035703491468543], [0.071273068413866714, 0.46314458240149148, 0.98467863226088359, -0.73552963118678538, 0.11450842678195161, -0.93182013540578845], [0.5519987259922956, -0.79089354035141546, 0.65437613380649018, 0.38825397666353756, -0.1601975042636048, 0.4286722033514625]]], [[[-0.26856159155699832, -0.94551077955781682, 0.86813413987711474, 0.042529627473033127, -0.75647779316943486, -0.81067824671501265], [-0.5963317202758982, -0.24890871116683733, -0.4436730009024108, -0.2198565350290751, 0.81871629610911323, -0.74018647665858794], [0.59825558206525264, -0.059987682496943862, 0.63747538233351508, -0.86392286028856513, 0.85231486533151246, -0.52901183525618189]], [[-0.49123452391065214, -0.1819402513408297, -0.61197036737502519, -0.436799042370968, -0.86899938773157404, 0.44238068210007198], [-0.83843992459355254, 0.88702051617583533, 0.5126132034738895, -0.84819069018036308, 0.10394330451336775, 0.23808964820547085], [-0.12869221874563452, -0.38871894816463581, 0.78588401644225581, -0.16049662523574693, -0.053721106849557998, 0.29849404342019392]]]])
1035            ref=tanh(xx)
1036            res=Evaluator(y)(x=xx)
1037            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1038        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1039        def test_whereNegative_Symbol_rank0(self):
1040            shape=()
1041            x=Symbol('x', shape)
1042            y=whereNegative(x)
1043            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1044            xx=numpy.array(0.42853508447)
1045            ref=whereNegative(xx)
1046            res=Evaluator(y)(x=xx)
1047            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1048        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1049        def test_whereNegative_Symbol_rank1(self):
1050            shape=(5,)
1051            x=Symbol('x', shape)
1052            y=whereNegative(x)
1053            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1054            xx=numpy.array([0.43206110009376641, 0.83634861958611206, 0.87015009415460853, 0.47086778120574446, 0.31148046825032227])
1055            ref=whereNegative(xx)
1056            res=Evaluator(y)(x=xx)
1057            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1058        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1059        def test_whereNegative_Symbol_rank2(self):
1060            shape=(2, 6)
1061            x=Symbol('x', shape)
1062            y=whereNegative(x)
1063            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1064            xx=numpy.array([[-0.81249813695208406, 0.10556352084573217, 0.76087363813661968, 0.1995897867335239, -0.41823964667714253, 0.084370240248581752], [-0.079285320543472038, 0.68610571499419648, 0.56132146277708261, -0.67996452779248551, -0.30597087355198527, -0.068654586350014979]])
1065            ref=whereNegative(xx)
1066            res=Evaluator(y)(x=xx)
1067            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1068        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1069        def test_whereNegative_Symbol_rank3(self):
1070            shape=(2, 2, 6)
1071            x=Symbol('x', shape)
1072            y=whereNegative(x)
1073            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1074            xx=numpy.array([[[-0.42201050805511531, 0.91355722702134279, -0.38070726582073999, -0.47440470954619673, -0.27932183900562246, 0.655128733945751], [-0.70864695882139039, -0.49362620091925735, -0.94285609595558895, 0.07528161581922066, -0.23667084443873487, -0.20591133999003119]], [[-0.0070020137163211427, -0.13295550812161605, -0.1553252023755074, -0.72679957022776964, -0.78415523731564152, -0.99691814151295755], [0.35203944647300811, 0.71977435737852047, 0.20131111743625252, 0.07351798956752531, 0.98539556854451815, -0.51145325110369733]]])
1075            ref=whereNegative(xx)
1076            res=Evaluator(y)(x=xx)
1077            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1078        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1079        def test_whereNegative_Symbol_rank4(self):
1080            shape=(5, 6, 3, 3)
1081            x=Symbol('x', shape)
1082            y=whereNegative(x)
1083            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1084            xx=numpy.array([[[[-0.245671131496906, 0.4848173617341609, -0.91936491012953603], [-0.73670296561619453, 0.30637743152787156, -0.20819138407059024], [-0.94672400180105232, 0.68027510852755513, 0.94519681296569935]], [[-0.2437922381642037, 0.47305859737257028, -0.6780587098993236], [-0.20227463811849367, 0.83180287352045301, 0.92064217765210499], [-0.39599046381166447, 0.24130853076489212, -0.67174997758170218]], [[-0.15309840986997814, -0.01632114748174418, 0.45997259930066026], [0.62809994454410556, 0.55128728808913863, -0.92264683187110008], [-0.61500967402752904, -0.99495870545746445, 0.18099454919626035]], [[0.445189156412654, 0.25169006757571633, 0.85243689442834247], [-0.22620813584364741, -0.39668037238409437, -0.86665865871895376], [0.62798374459861894, 0.29066747251335467, -0.16345331480731806]], [[-0.9799649489903195, 0.56560455207561922, -0.19286372982454303], [-0.8461325895977434, -0.18717926693755516, -0.067885080791339369], [0.40264648307733175, 0.6729051950296987, -0.46080798478773288]], [[-0.074614772993127021, -0.34092919242572428, -0.11072227592069117], [0.18903451798528703, -0.28128236641662641, -0.99495364270906328], [0.40440864709575508, -0.35219083975644128, -0.4575557314165366]]], [[[0.97394989689484857, 0.15019962657241215, -0.49731364397014799], [-0.10126386942722498, 0.77142383095597222, -0.38740411186299628], [-0.79331445642953957, 0.94206088726851478, 0.13907383192925549]], [[0.89783659296286489, 0.41210734704064445, -0.079165707498179083], [0.44108687006413949, 0.33239557183757285, -0.037656993643554459], [-0.82314643008837818, 0.48313939226926172, 0.87831283723780906]], [[-0.00115239459151395, -0.67213055269665767, 0.36297363042924768], [0.63321118021951173, 0.99953214952552027, -0.85765926949885007], [-0.38054559563577617, 0.70260867347068756, -0.35265598334392245]], [[-0.28671501078575168, 0.90992094336582308, 0.59907970770425578], [0.6831238758973277, -0.7067834615094819, -0.37277489178006018], [0.42496081838956479, -0.37453255931968266, -0.08178890238972758]], [[0.44587724077395396, -0.36694098161312461, -0.44044245786997194], [0.15804325280455922, -0.18156638367899225, -0.80205747778748249], [0.095277402247099463, 0.28041822387798354, -0.51378557743693931]], [[-0.99166825226627453, -0.083598690856507396, 0.63729493096657275], [-0.58861379670915071, -0.81698368681230527, -0.64675408403668011], [0.051905480731319509, -0.68251723183167212, -0.0067693110774600385]]], [[[-0.44509438815374525, 0.59972174459227112, -0.77831781776733711], [0.76911675976261251, -0.45087716010119183, 0.46114208431575832], [0.92669053365900389, -0.70666679726792725, 0.26620964917056611]], [[0.78843307945692143, 0.77604643540176776, 0.32660920770664004], [0.79070732664929166, 0.15885227363672771, -0.79859724957395839], [0.50640311031214003, -0.66666980363870398, -0.59740831937545491]], [[-0.78890850525466094, 0.69368754414836209, -0.97947773077448441], [0.20448502323163797, 0.99635971801535472, 0.58791400014415074], [0.32145420766361799, -0.13151318406555967, -0.38256931614446987]], [[0.2817511546532494, -0.32151893652812191, -0.73166480999721362], [0.27522764916220144, 0.81123534064756919, -0.26965837854381869], [0.82889693179224011, 0.28871806497673913, 0.58050886769071752]], [[-0.030141470978212404, 0.86430401580301086, -0.94067539423860569], [-0.0084447588775293791, 0.28987060069958992, -0.07273765994828274], [0.38718059843314423, -0.13677491924282115, -0.69882665166732028]], [[-0.10936826145160494, -0.085742421345417652, -0.59508514038877114], [0.32971245312496489, 0.97689252540128235, -0.85079908192818188], [-0.26864988977196136, 0.41006858827689885, 0.010033459866110483]]], [[[0.056024945222296729, -0.38941460302055053, -0.39730264647503999], [0.34993021833604265, 0.67299620879864408, 0.31774013558579939], [0.94477002361107032, 0.35493043567408167, -0.20346381377400213]], [[-0.39592815784416313, -0.63141397392576626, -0.62461175958254733], [0.35176555437612933, 0.11073593023635997, -0.45194900149513262], [0.53918155704705528, 0.52004902125188979, -0.73160204180776911]], [[0.27018530034293176, -0.66383884017086237, 0.57792755007922469], [0.17991645429291614, -0.28817104618296274, 0.41533122344870965], [0.80589526432643921, -0.3103008950265127, -0.49865435333636832]], [[0.56494023285174344, 0.57129166627215855, -0.7419472189943277], [-0.7259373054444811, 0.4185258558841769, 0.71143387050402374], [-0.058856704944132199, 0.73860442844522511, -0.39474006178420429]], [[-0.75987232756584078, -0.60068657588644303, 0.81596182811193119], [0.19261305271948403, -0.40050743334695538, 0.56051499644839398], [-0.25871601483851259, -0.73364388854161788, -0.66590689918899737]], [[-0.42243032346384113, 0.24524983314780191, 0.52345129902387444], [0.59084094221967365, 0.0474142782864444, -0.42093554761686502], [0.5093987882590203, 0.26230170061322156, -0.41546677782545127]]], [[[-0.27587563062988774, 0.18788423954774736, 0.75207992228260578], [0.038134600966506893, -0.85205831305854818, 0.35141090531460883], [-0.78742647494855911, -0.55988984350461313, 0.84542148072873613]], [[0.033663116058496367, -0.91310199741275389, 0.84415898368714393], [0.26863032696363365, -0.084379608446330856, 0.82194629148019271], [-0.66487247773086144, -0.42622270743777735, 0.48856166682036051]], [[-0.85121925736392057, -0.81917330584124226, 0.93775723883517448], [-0.32013856425169362, 0.4479007006665201, -0.7680194615612761], [-0.63009082841841635, -0.17490113582300149, -0.059314073704885617]], [[-0.09186329491498868, 0.06059696140697568, -0.11156067469398678], [-0.86041659936124204, -0.43955964486536581, 0.25068034331854339], [0.28067276850427603, 0.29340855065077664, -0.29629771765619095]], [[0.91299141637445902, 0.077174125399852134, 0.4807684035910802], [-0.58707634264984754, 0.5599540512743868, 0.68509801379647839], [-0.60254581502500648, -0.74765196577437831, -0.31197391415193954]], [[-0.0014273874539123543, 0.76198232231447038, 0.63758515096227697], [0.68621977456885586, 0.91822118622789373, 0.98806114562455116], [0.22417448614072288, -0.92392405251876708, -0.8268352629089748]]]])
1085            ref=whereNegative(xx)
1086            res=Evaluator(y)(x=xx)
1087            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1088        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1089        def test_whereNonNegative_Symbol_rank0(self):
1090            shape=()
1091            x=Symbol('x', shape)
1092            y=whereNonNegative(x)
1093            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1094            xx=numpy.array(0.77488583754)
1095            ref=whereNonNegative(xx)
1096            res=Evaluator(y)(x=xx)
1097            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1098        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1099        def test_whereNonNegative_Symbol_rank1(self):
1100            shape=(1,)
1101            x=Symbol('x', shape)
1102            y=whereNonNegative(x)
1103            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1104            xx=numpy.array([0.7548683063954309])
1105            ref=whereNonNegative(xx)
1106            res=Evaluator(y)(x=xx)
1107            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1108        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1109        def test_whereNonNegative_Symbol_rank2(self):
1110            shape=(6, 3)
1111            x=Symbol('x', shape)
1112            y=whereNonNegative(x)
1113            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1114            xx=numpy.array([[0.19478398248770867, -0.93605929486367789, -0.84633027353070611], [-0.4247714504246447, -0.88358187229559326, 0.64571786910507467], [-0.60678756789374488, 0.42408078501979829, -0.34091291498061405], [-0.18719514528889158, 0.50162922306307389, -0.87142114251914782], [-0.52961791066475605, 0.51877436445966141, -0.25484192861052279], [-0.95553918566448681, 0.84050933290833729, -0.30872468784517459]])
1115            ref=whereNonNegative(xx)
1116            res=Evaluator(y)(x=xx)
1117            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1118        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1119        def test_whereNonNegative_Symbol_rank3(self):
1120            shape=(1, 6, 2)
1121            x=Symbol('x', shape)
1122            y=whereNonNegative(x)
1123            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1124            xx=numpy.array([[[0.92793402042789674, 0.19137994701669525], [-0.12290272635493027, -0.47511962017468679], [-0.81978174526750069, -0.45606354990500186], [-0.17468598506647148, -0.61225289617779977], [-0.2979127663698713, 0.30798369311660379], [-0.24004186558525364, 0.70492056047663931]]])
1125            ref=whereNonNegative(xx)
1126            res=Evaluator(y)(x=xx)
1127            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1128        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1129        def test_whereNonNegative_Symbol_rank4(self):
1130            shape=(1, 2, 3, 6)
1131            x=Symbol('x', shape)
1132            y=whereNonNegative(x)
1133            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1134            xx=numpy.array([[[[0.19734181862560329, -0.52364459371933481, 0.35215586074023397, 0.60580509552026074, 0.24481949837513084, 0.42619903364126466], [0.54009896704139226, 0.34876258512578562, 0.70713076787851237, -0.4468693048395378, -0.82894104467113139, -0.47127533691251555], [-0.32835632548722149, 0.55468182353139994, 0.35942750685844604, 0.0035727412636350486, -0.072578508993385915, 0.96352468136139335]], [[-0.1702924892712645, 0.32118929524770712, -0.480017764097592, 0.49260088888686826, -0.090655833037053046, -0.46886667927894043], [-0.35350201592628316, -0.13239195422038219, 0.83849922332385751, -0.71829010357812018, 0.090086797135722874, 0.60611096639549022], [-0.072000052233159195, 0.58940921488168918, 0.34780442090328156, 0.52827809640276047, -0.67098831990477681, -0.089667492445145047]]]])
1135            ref=whereNonNegative(xx)
1136            res=Evaluator(y)(x=xx)
1137            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1138        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1139        def test_whereNonPositive_Symbol_rank0(self):
1140            shape=()
1141            x=Symbol('x', shape)
1142            y=whereNonPositive(x)
1143            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1144            xx=numpy.array(-0.102464280555)
1145            ref=whereNonPositive(xx)
1146            res=Evaluator(y)(x=xx)
1147            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1148        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1149        def test_whereNonPositive_Symbol_rank1(self):
1150            shape=(3,)
1151            x=Symbol('x', shape)
1152            y=whereNonPositive(x)
1153            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1154            xx=numpy.array([-0.95382088265311138, -0.96389371039650662, -0.79881781125607798])
1155            ref=whereNonPositive(xx)
1156            res=Evaluator(y)(x=xx)
1157            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1158        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1159        def test_whereNonPositive_Symbol_rank2(self):
1160            shape=(5, 6)
1161            x=Symbol('x', shape)
1162            y=whereNonPositive(x)
1163            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1164            xx=numpy.array([[-0.4689748842557151, 0.31999432660294569, 0.048853179002233738, -0.61079159873333611, -0.70769652049051812, -0.52856709767107568], [0.34276151301270774, -0.41079876845527963, 0.58744575508554475, 0.92829380017187324, 0.30756384351974964, -0.61816838813359376], [0.32029406085918244, 0.57883929167198889, 0.8488456656073804, -0.85409841050130897, 0.32437270883785496, 0.049896352519669396], [-0.41173159047049812, -0.24328749336373212, 0.00075111933658655872, -0.45378552056860522, 0.45823861108763753, -0.85503296969429399], [0.7622192746656411, 0.082388003753710581, 0.50159399017908468, 0.76333048056620934, -0.83291014593033652, 0.16927429726214571]])
1165            ref=whereNonPositive(xx)
1166            res=Evaluator(y)(x=xx)
1167            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1168        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1169        def test_whereNonPositive_Symbol_rank3(self):
1170            shape=(6, 5, 6)
1171            x=Symbol('x', shape)
1172            y=whereNonPositive(x)
1173            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1174            xx=numpy.array([[[0.17541726143216452, 0.35262910590012964, -0.35203643502297055, -0.57104898718493247, -0.65140555333817107, 0.11813999804072606], [-0.59086197843010924, -0.16994850533687123, 0.66371513890314082, -0.65086390115528636, -0.97556995170362626, -0.52163982977838841], [0.35716329385726553, 0.73075540421821317, 0.83884992212603149, 0.23827314651932441, -0.47433689311379812, 0.29896402622381735], [0.10746617573756434, 0.73735573050101144, -0.33356391942832042, 0.56623720748084461, 0.67712467116210195, 0.99918543890853284], [-0.6164602492587683, 0.4073928768062316, 0.81620900363798232, -0.73167152001582147, -0.2832862003563752, -0.5299751176862566]], [[-0.43061335413378088, -0.11760337326877468, -0.68317414754850114, 0.17362548294805191, 0.44409406342568825, 0.65773264922591546], [-0.89577403202889605, -0.75871242083243318, -0.28304875601216817, -0.57679548815524884, 0.98651268690290084, 0.19385734528951915], [-0.31681925026375368, 0.56581438508533055, -0.28754223115580491, 0.18468794024421253, 0.6439676898633877, -0.032985553430847636], [-0.85140456936442122, 0.70156243621983139, 0.46630095812450967, -0.9582348565504748, -0.51410089456059649, 0.8566801726464599], [-0.96458111991460505, -0.049967320484441524, 0.9023401724743525, 0.81961243322000188, 0.6346670910525023, 0.42599118500368394]], [[-0.076727382318347415, -0.81800847638621055, -0.57099460250987644, -0.81056349418702367, 0.04420829951705274, 0.63854285509858721], [-0.66749267649204258, 0.98290190040963932, -0.19261228802599328, -0.38627399578160881, 0.46322818731317383, -0.93277185532220286], [-0.64309739073485273, -0.082315624606597027, 0.14060667032277063, 0.013993374197078357, -0.63585543524189014, -0.53545596072683121], [0.20426957620323138, -0.76764107467269982, -0.37592191346124659, -0.68468793925918603, 0.82733072521206541, -0.047703751791761118], [-0.2130935090034225, 0.13922334099894162, -0.65137390765911451, -0.50163248288444939, 0.82124571841631622, -0.24317404326505443]], [[0.76432003916322278, -0.26533448903182877, -0.42443566070217131, 0.56868384572339448, 0.1836447373650012, 0.5515025847096815], [0.70556277497720665, -0.71341244471734222, 0.98005834047731755, -0.58472299690262575, -0.63249198948154728, 0.34262185895984865], [0.15131184016122035, -0.004898872142147459, -0.20787662279877717, 0.38650824967200537, 0.49307567127879381, 0.74455747542124073], [0.056872832820261454, -0.39324294651403857, 0.10463980149985019, -0.82222790420381497, 0.89602110313279404, -0.13682766968635085], [0.57886347034519536, 0.015612529741620307, 0.46979107716417667, -0.69915713149963232, -0.94141705848161217, 0.51172003075890249]], [[0.13994015088803247, 0.9495577675024871, -0.95399373731312243, 0.32284860726437792, -0.60793604479145924, -0.22899652627637068], [0.5439511903170875, 0.086674973972199254, -0.59230299250620444, -0.85806468277714809, 0.88589272490118098, 0.25697097099821287], [-0.16985426679104187, -0.68456414308055225, 0.49363954383170894, -0.72518723992826017, -0.75071699315624563, -0.60343111170074737], [-0.88284691450313835, 0.48157929411889056, 0.25385764322464843, -0.36567009870755451, 0.82109550952800658, 0.8181336594784776], [-0.71144361101683185, -0.79934533707854949, -0.65911703240588215, 0.27393210430393311, -0.70714285227992013, 0.12160486488241706]], [[-0.04064403590320298, -0.1068248351554193, 0.35396785533305919, -0.3886446143142972, -0.60949749651272667, -0.98929819029769961], [-0.31090195753211614, -0.40709998765838207, -0.037831324138178912, 0.98229536275850049, -0.64095296868589591, -0.44315741185474677], [-0.47756101404167217, 0.73262283430657749, -0.96077095823093339, -0.36253687088383657, -0.063363324193753678, 0.65669342374856088], [-0.092402409738372215, 0.18228583947610799, -0.80392502564474766, 0.75408287032155252, 0.37608210847184331, 0.40302972148290261], [0.99691487848251104, 0.27330456447773854, -0.94620806942126778, 0.57384716771331146, 0.32729139245662364, 0.65522373477071838]]])
1175            ref=whereNonPositive(xx)
1176            res=Evaluator(y)(x=xx)
1177            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1178        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1179        def test_whereNonPositive_Symbol_rank4(self):
1180            shape=(6, 1, 4, 3)
1181            x=Symbol('x', shape)
1182            y=whereNonPositive(x)
1183            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1184            xx=numpy.array([[[[0.86892418874895827, -0.23120088101180936, -0.81810043536144872], [-0.5161211329426374, -0.15204947416975467, 0.6728139691527053], [-0.12978405702520845, -0.9132685546273942, 0.83669156087841201], [-0.040493245163691016, -0.29011153889075514, -0.69621052435943986]]], [[[-0.090170536982016047, 0.46425316748668655, 0.75426228550506713], [-0.20426807333107355, -0.86280386337926585, -0.9446893635005813], [-0.25458258942475842, -0.8671050321973246, -0.21903768747194041], [-0.98304907694419597, 0.37731719882209336, -0.3973389083409351]]], [[[-0.65494070010692518, 0.56471498675554432, 0.35416087723833534], [-0.54704672320820058, -0.75419314654176861, 0.91574502605747465], [-0.43509061379474012, 0.14790895676767124, -0.26854727709358994], [-0.13404261277644292, -0.74539126632580932, 0.86931705278354365]]], [[[0.90677848946440132, 0.30316514230273839, -0.14953558864890248], [-0.60840121453891527, -0.98032585004965345, 0.41704143846437147], [0.25374300723929366, -0.080373008718369388, 0.53642976760702576], [0.60710874527380465, -0.63637136772021052, 0.78760481864547338]]], [[[-0.18480576598954368, -0.80721046414870345, 0.79011040825075529], [-0.49570735524281906, 0.85741936884162251, 0.75002534625409423], [-0.24569603857294631, 0.46409165720769874, 0.069976430763303954], [0.31478123453138607, 0.87412820914357336, -0.88160637973467204]]], [[[0.96054588453725542, 0.4545582745686203, 0.088149449756248055], [0.26975839161044712, 0.8474373884478601, -0.91916065397418856], [-0.53972106184863455, -0.29030756942647584, 0.79324278454162589], [-0.76150661183265167, 0.48106983719118857, -0.22318600907394481]]]])
1185            ref=whereNonPositive(xx)
1186            res=Evaluator(y)(x=xx)
1187            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1188        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1189        def test_whereNonZero_Symbol_rank0(self):
1190            shape=()
1191            x=Symbol('x', shape)
1192            y=whereNonZero(x)
1193            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1194            xx=numpy.array(-0.168715220752)
1195            ref=whereNonZero(xx)
1196            res=Evaluator(y)(x=xx)
1197            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1198        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1199        def test_whereNonZero_Symbol_rank1(self):
1200            shape=(3,)
1201            x=Symbol('x', shape)
1202            y=whereNonZero(x)
1203            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1204            xx=numpy.array([0.67214522673504362, 0.59034125552219896, 0.68027422973414486])
1205            ref=whereNonZero(xx)
1206            res=Evaluator(y)(x=xx)
1207            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1208        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1209        def test_whereNonZero_Symbol_rank2(self):
1210            shape=(1, 1)
1211            x=Symbol('x', shape)
1212            y=whereNonZero(x)
1213            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1214            xx=numpy.array([[0.62899144379887484]])
1215            ref=whereNonZero(xx)
1216            res=Evaluator(y)(x=xx)
1217            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1218        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1219        def test_whereNonZero_Symbol_rank3(self):
1220            shape=(4, 1, 1)
1221            x=Symbol('x', shape)
1222            y=whereNonZero(x)
1223            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1224            xx=numpy.array([[[0.3722989625644606]], [[-0.65711064503090899]], [[-0.6606231553067885]], [[-0.14267241003179532]]])
1225            ref=whereNonZero(xx)
1226            res=Evaluator(y)(x=xx)
1227            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1228        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1229        def test_whereNonZero_Symbol_rank4(self):
1230            shape=(6, 1, 4, 5)
1231            x=Symbol('x', shape)
1232            y=whereNonZero(x)
1233            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1234            xx=numpy.array([[[[-0.68752514411297549, -0.84441677265736481, 0.32839284189702456, -0.17514823094739085, -0.69422346557101489], [0.13489479460534626, 0.34100442669511533, -0.3471407881047246, 0.96579318439768413, 0.25624438169834129], [0.22485841327167222, -0.2617461396355456, -0.3700175940797934, -0.040768269976656057, -0.011483032696096407], [0.80466766620814112, -0.14527970462061157, -0.6650852220140111, -0.49558590611310582, 0.19118701283908757]]], [[[-0.60455381295990973, 0.11301077127658354, -0.87046646481258771, -0.36468414124510828, -0.91522920154568665], [0.17664467912658077, 0.71962059026111058, 0.13329002735641438, 0.95622376255600217, 0.30608319587387456], [0.27207686169023937, -0.54412565402231472, 0.92608732489048151, -0.94336136069619858, -0.80659824395522484], [0.72245626736149071, 0.45160043557769747, 0.73484559188162435, -0.65518512947106866, -0.75184331242555924]]], [[[0.44443146121988719, 0.16197775053888464, -0.46153705341053031, -0.46939547518872016, 0.55388068830222781], [0.49796677338698592, 0.72188283974719702, 0.55826250507014863, -0.83189054567464438, 0.69828221267744794], [-0.62034639606889397, -0.14286060387121324, 0.67911323328496809, -0.5158594485696375, 0.49812075781918153], [-0.73530393146003226, -0.93801959648384692, 0.51890871967798424, -0.76411385478874982, 0.12031413737656949]]], [[[-0.58226025064350395, -0.29691624448325693, -0.14844288100485215, 0.79283896927207498, -0.14621424418146001], [-0.78739106662807767, 0.92521892294528763, -0.43195661849481826, -0.88060557942258599, -0.4449792293197139], [0.069852660445831605, -0.40495148810269588, -0.062219693893593941, -0.5853131392724682, -0.16316917979600531], [-0.93016390894379053, -0.02715797687956556, 0.90580082782980176, -0.89216032119782707, -0.67083359520314212]]], [[[-0.72565546586608143, 0.34892346656577589, 0.25449144865817575, 0.35639264625167177, 0.32808054176517332], [-0.1070638815607392, -0.81419525771067058, 0.3039473141055975, -0.8824598647558024, -0.89971488541747457], [-0.17953276257417872, 0.71195811554210864, -0.41000884650314529, 0.49173673765836745, 0.62310139391879638], [-0.9811299534507627, 0.08634885223906319, 0.13732837755352612, 0.0016736869265219223, -0.63529778641493806]]], [[[-0.90285046602560115, 0.1010041676214426, -0.91083048526899968, 0.75953834102302031, 0.11245973522159236], [0.41160960274597236, -0.023473395509007622, 0.24014494704687372, -0.27610446555581447, 0.14803341465744202], [-0.55168644049871074, -0.59976136455882201, 0.60267836754844395, 0.43159820690095407, 0.95281360733651566], [0.22277555792574577, 0.6512549281873814, 0.7171031303778439, -0.21591202122822306, -0.19673641981743217]]]])
1235            ref=whereNonZero(xx)
1236            res=Evaluator(y)(x=xx)
1237            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1238        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1239        def test_wherePositive_Symbol_rank0(self):
1240            shape=()
1241            x=Symbol('x', shape)
1242            y=wherePositive(x)
1243            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1244            xx=numpy.array(-0.438191294237)
1245            ref=wherePositive(xx)
1246            res=Evaluator(y)(x=xx)
1247            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1248        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1249        def test_wherePositive_Symbol_rank1(self):
1250            shape=(4,)
1251            x=Symbol('x', shape)
1252            y=wherePositive(x)
1253            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1254            xx=numpy.array([-0.061119050423196875, 0.18870279905524701, 0.1436583757190053, 0.48174341199174253])
1255            ref=wherePositive(xx)
1256            res=Evaluator(y)(x=xx)
1257            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1258        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1259        def test_wherePositive_Symbol_rank2(self):
1260            shape=(1, 6)
1261            x=Symbol('x', shape)
1262            y=wherePositive(x)
1263            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1264            xx=numpy.array([[-0.74907853682610415, 0.70271824955068607, 0.5861160479339973, 0.22062036216974312, 0.77349615351516143, -0.49091068998967713]])
1265            ref=wherePositive(xx)
1266            res=Evaluator(y)(x=xx)
1267            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1268        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1269        def test_wherePositive_Symbol_rank3(self):
1270            shape=(6, 2, 2)
1271            x=Symbol('x', shape)
1272            y=wherePositive(x)
1273            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1274            xx=numpy.array([[[0.16731464344521862, -0.17864720551445346], [-0.8270952775505922, -0.61333485272283372]], [[0.64169592731433145, 0.15839184052793565], [0.9886094548313562, 0.77102467542292241]], [[-0.89011713871072362, 0.69743244207046429], [-0.055929906619226477, 0.80927779891383089]], [[0.16301241615577289, -0.26406095513492711], [0.64380958344085748, -0.22880522246315449]], [[0.93796122963786899, 0.80122563540866332], [-0.3467389962727232, -0.60231261909950495]], [[-0.23155020616958089, 0.81744153146452692], [-0.64772868300967423, 0.33451537750216009]]])
1275            ref=wherePositive(xx)
1276            res=Evaluator(y)(x=xx)
1277            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1278        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1279        def test_wherePositive_Symbol_rank4(self):
1280            shape=(4, 3, 6, 3)
1281            x=Symbol('x', shape)
1282            y=wherePositive(x)
1283            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1284            xx=numpy.array([[[[0.055451386333695396, 0.89878562827109221, -0.19867116389378392], [-0.70098805273405262, -0.81615396204931145, 0.48831486424769754], [-0.086269826117491011, 0.41460276861454948, -0.097279309641456813], [0.49953009841402718, -0.0088387700999010832, 0.32542524738014333], [0.21372901624086937, 0.74095206463279828, 0.80488983604732556], [-0.14868321283205566, 0.61985302495856165, 0.072059718809681206]], [[0.8020196818858969, -0.023513052630552478, -0.66916755172853515], [0.3183178901338739, 0.97845950368722723, 0.096978590386210151], [-0.46655818119385239, -0.8843041343204614, -0.080655095117058595], [-0.28560669936687444, -0.061326741742632196, -0.92428545745178092], [0.27360632867241508, 0.27472621954707166, 0.48411021022293332], [-0.61916715534853273, -0.29108706706100573, 0.93436970308823764]], [[-0.24372349298194962, -0.75934172957201329, 0.47086491759050753], [0.14559760896749241, 0.5041759171642608, 0.3741419736484235], [-0.018955427918418977, 0.64872653091455379, 0.49853852228029694], [-0.36484648002399034, 0.84714379914832527, 0.32387543159219367], [-0.47009052148289587, 0.12802106563697979, 0.50758689707780613], [0.23613478887281292, -0.43956249301109285, 0.95090353777048287]]], [[[0.75428774100307194, -0.50142307884608228, -0.57924723174983628], [0.26044912492521122, -0.3168935265082331, -0.81880292149452716], [0.66868137575466902, 0.76276820194726747, 0.28770760098553039], [0.17020212746727292, 0.88630849625979158, 0.6757273712060925], [-0.48325108341145162, 0.87734183732476412, -0.1731096042452569], [0.067733416313086714, 0.17711739970981633, -0.082093298925675073]], [[0.36473060444701577, 0.6735369555110009, -0.97973486356110917], [-0.50748667186375385, 0.64840650386764276, 0.43417217434324784], [-0.79813995714905128, -0.8072658843772782, 0.7171897111603136], [0.88322163438251677, 0.15215586271598136, -0.23833192142045179], [0.87954391763974749, -0.76855865745487706, 0.78303305751757657], [0.63612295785285111, 0.57152482744776845, -0.3184565782347033]], [[-0.75986472914779779, 0.21050922289720431, 0.75455602570538582], [-0.12573550321000759, 0.10320445751475682, -0.156904290163145], [-0.10272105388966457, 0.53912922251759965, -0.48115009025207645], [-0.91522819245321241, 0.0022769763996275394, 0.31023459297273659], [0.13862005081661843, 0.08353682070897972, 0.71241053483261085], [-0.081552859261407429, -0.72913795938321457, -0.92399841364738444]]], [[[-0.80073612255811466, 0.90023781259515867, 0.18795076273064959], [-0.15098768504151905, -0.71587516139369067, -0.97229362396511898], [-0.10460627019384461, -0.81398827712712207, -0.72071537854031442], [-0.79039626903543736, 0.32938072901008031, -0.42403258263222443], [-0.072249097024825737, 0.60656128517591212, 0.55639281464617385], [0.097095558964957807, 0.26800580385345762, 0.050339463039562826]], [[0.27341344802274614, 0.37748736227872026, -0.94022589056166872], [-0.19592297086959154, -0.96456324163504115, 0.82027547812482715], [-0.7978893156305471, 0.10714447854399856, -0.87251983009416434], [0.44994796640012202, -0.45826231032314624, 0.046109896346812285], [0.74434934493546856, 0.99630098885288576, -0.32240205923272525], [-0.75525269336550638, -0.38156251751929715, 0.40686328767844615]], [[0.25121450488940944, 0.095025106933026793, -0.54889227845689326], [-0.68491442623067167, 0.14609375856215312, 0.38942779106736847], [0.3684198937909442, -0.35598153405570088, 0.68645545935119689], [-0.21634446477697078, 0.9549341376185041, -0.68951887465902373], [-0.73645536973894155, 0.79439981514408831, 0.1019715432003141], [0.50282092964417324, 0.55344837314143747, -0.57480909488630072]]], [[[-0.77369165207660417, -0.050781418851808757, 0.84133823622641724], [0.23118181916689262, 0.58318709783274625, -0.89720323915692046], [-0.72968397048827982, 0.26797584583394607, -0.80844602436573698], [-0.34058787194765761, 0.68679545136641207, -0.8407428602832423], [0.83332875673862761, -0.95443882456064411, -0.76615157930939803], [-0.71754412803028478, -0.61272567682120616, 0.49092557311668372]], [[0.100380461986467, -0.90065800891235126, -0.50710382562763168], [0.95205111565239253, 0.58541623420612865, -0.63065569519750486], [0.37672706224571617, -0.87166500881191067, 0.92874069224413835], [0.24595010051738653, 0.9652664998916618, -0.91810087714490574], [-0.046120949813266199, 0.25725398770160712, 0.46812403578116468], [0.33958363259969571, 0.47634620985208342, -0.96021247823518152]], [[-0.61479946542394037, 0.93295168797186556, 0.9771456700083776], [0.50737574708560818, 0.22046878256535241, -0.85026809155612026], [0.42214506026559917, -0.75488447489201649, 0.55138951162832184], [0.099123722845680717, -0.83047607239238519, -0.48083862540357614], [0.052989029976337809, 0.39607961061145969, 0.24230060458482239], [0.98476711544636553, 0.99175665281140835, 0.25832816841557493]]]])
1285            ref=wherePositive(xx)
1286            res=Evaluator(y)(x=xx)
1287            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1288        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1289        def test_whereZero_Symbol_rank0(self):
1290            shape=()
1291            x=Symbol('x', shape)
1292            y=whereZero(x)
1293            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1294            xx=numpy.array(-0.914655410713)
1295            ref=whereZero(xx)
1296            res=Evaluator(y)(x=xx)
1297            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1298        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1299        def test_whereZero_Symbol_rank1(self):
1300            shape=(2,)
1301            x=Symbol('x', shape)
1302            y=whereZero(x)
1303            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1304            xx=numpy.array([0.83350248064124721, 0.84948125815913711])
1305            ref=whereZero(xx)
1306            res=Evaluator(y)(x=xx)
1307            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1308        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1309        def test_whereZero_Symbol_rank2(self):
1310            shape=(3, 1)
1311            x=Symbol('x', shape)
1312            y=whereZero(x)
1313            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1314            xx=numpy.array([[-0.60626761247736805], [0.77652921645480166], [-0.76210550233804675]])
1315            ref=whereZero(xx)
1316            res=Evaluator(y)(x=xx)
1317            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1318        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1319        def test_whereZero_Symbol_rank3(self):
1320            shape=(1, 3, 4)
1321            x=Symbol('x', shape)
1322            y=whereZero(x)
1323            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1324            xx=numpy.array([[[-0.1073829236469277, 0.50676851501167364, -0.9190724930346732, -0.49399901446544536], [-0.059983475970388556, -0.83113557658399873, 0.89164686111330393, 0.58420714368192961], [-0.42051431808211293, -0.21141282208656165, -0.60808773180879694, -0.99093834090495259]]])
1325            ref=whereZero(xx)
1326            res=Evaluator(y)(x=xx)
1327            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1328        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1329        def test_whereZero_Symbol_rank4(self):
1330            shape=(5, 3, 3, 5)
1331            x=Symbol('x', shape)
1332            y=whereZero(x)
1333            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1334            xx=numpy.array([[[[-0.83941105579479025, 0.83278498836019055, -0.83931406450244972, 0.41638492994463072, 0.28537236982054504], [0.18718765648204405, -0.74789718798579496, 0.19239037721712737, -0.090757888250690311, -0.96163283937395927], [0.82082263512265774, -0.32293940783490349, 0.61049219892499296, 0.21307702000752093, -0.95894435377397125]], [[0.54990366221992515, -0.3994029053508048, 0.24783365952983316, 0.2642526494329529, 0.77658453229920488], [0.23931270439468655, -0.81238160012493688, 0.93304758447236136, -0.43974291715591174, 0.029384577459990124], [-0.81293375267384715, -0.0090004740230413827, 0.24376389105645235, 0.43389325504466747, 0.65516516394358093]], [[0.89192211093210139, 0.83594505542276298, 0.4060386326320673, -0.65996385963318938, 0.98290241216573127], [-0.74454083575055963, -0.96073579602972647, -0.67010326424137534, -0.9608744201352124, -0.35834040401887046], [0.022404972507800824, 0.22619310837371209, -0.3258984643197671, 0.39282495194682143, 0.82290203535385631]]], [[[0.95169485622865824, -0.34187340688458301, -0.78634864812898697, 0.78621921448070853, -0.13914665920755009], [0.88521977418554143, 0.55726732825673397, -0.95340364052828708, 0.82069194976074811, 0.38745840024448719], [-0.76885850257501742, -0.49226684310649071, 0.6310199990860017, -0.59583969586067465, 0.55756756306026878]], [[-0.85885654411032109, -0.79583136717720326, -0.79340486893741269, 0.99328206775748651, -0.44075717496503608], [0.32926693076625302, 0.41277527634847666, -0.47697767966410676, -0.8105362717713398, 0.8576921346689097], [0.26689367367859895, 0.77198921162324186, -0.60834607009876041, -0.83582808129702402, -0.8525450137388848]], [[0.095170043895564493, 0.7010339057900381, -0.093557875980226024, -0.28586534872883851, 0.55395495836868913], [-0.13985693504355812, -0.33249916089632325, 0.66595874035187053, 0.58384792124849083, 0.54115231442295686], [-0.36710978951894369, -0.77757522531643741, -0.020861454148379588, 0.12969569039154405, -0.72628725778733183]]], [[[0.82351649169873231, 0.13015494828114971, -0.44296139490860753, -0.68827714876326107, 0.3288222641264642], [-0.99657968335497404, 0.13046485345226722, 0.43525087799916506, -0.6210943850203352, 0.2687646832906172], [-0.012695809929800461, 0.28422795982808302, 0.56772679923353531, -0.35989840912198257, 0.37478650363443067]], [[0.16934997437182919, 0.029983786381820421, -0.51674661838124236, 0.75169645874701696, 0.20820931855512215], [-0.26557333575614472, -0.82954675835021585, -0.99256133708028038, 0.87665986069271762, 0.46990836998576579], [-0.66416500902048492, -0.057123491058536313, 0.020348747941931311, -0.23940287477631927, 0.06800036625603223]], [[-0.54887547103075307, -0.43143653788240721, 0.22237120905582275, 0.50468750714936905, -0.96922177862701475], [-0.69839643700957543, -0.85141929956868823, 0.18562649498691886, 0.31707067021778723, 0.25973546346148368], [0.71759598239126388, -0.079911259575809579, -0.0050189748344666718, 0.25687114462746874, -0.62198300355098368]]], [[[0.62757167218486587, 0.48367013066744624, -0.23984893253197392, 0.86469509213374462, 0.09509690274755167], [0.75113631336658071, -0.45669942800704466, -0.44245971970549491, 0.73571049558108381, 0.89906745172433733], [0.62281184561528313, 0.42638158602419396, 0.71490244295846428, 0.7950843786813917, -0.48739932182514534]], [[0.71371537367370919, 0.20799265266122169, -0.17576487910096494, -0.82181555778746795, -0.88846688971097443], [-0.31704935577377569, -0.37414397080354411, -0.15519161168030515, 0.33587422769291675, -0.53147899282721989], [-0.26540632156885735, 0.53443064050314137, -0.88441809562462081, 0.92737740838766558, 0.044870314957567992]], [[0.77244531169491282, -0.073579326393350186, 0.28541550718315922, -0.57795688396949441, 0.92173537252621274], [-0.3791271474397242, 0.4795809544549916, 0.39383814213200119, 0.24726499289903225, 0.6514007953440164], [0.41672222910880308, -0.92912982735620564, 0.12818977320921832, -0.075621939107357816, -0.063990459133624222]]], [[[-0.17065891291838353, 0.81076843444649893, 0.91986331092950446, -0.71209547606213053, 0.34159024021396545], [-0.89945581946651876, -0.97577700957389757, -0.60630665987942289, -0.31657511133249905, -0.51638421362661235], [0.83577387702667671, 0.14412341267182027, -0.42457645365187568, -0.7755954079447438, 0.38513195890441398]], [[0.45222276683442364, 0.4325216049771643, 0.30087243854729384, -0.83842852191512485, 0.70895818547876543], [0.54675500994016013, -0.68090177708980293, -0.40390877479911391, -0.62417972846075376, 0.10583718272497822], [0.53914946682369735, 0.75021954178784167, 0.59715225404113004, -0.96942708129718813, -0.36542539284260145]], [[-0.5533989730027038, -0.21203071042942456, -0.29419727270995488, -0.017520885386318685, 0.47664809921429763], [0.28559071489952248, -0.039546034825929777, -0.23967818885059078, -0.64787678117720171, -0.20512680015329687], [-0.84875152788331043, 0.59766508383440864, 0.3915519838963033, -0.56505692655198025, 0.31532780507689262]]]])
1335            ref=whereZero(xx)
1336            res=Evaluator(y)(x=xx)
1337            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1338
1339        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1340        def test_nonsymmetric_Symbol_rank2(self):
1341            shape=(1, 1)
1342            x=Symbol('x', shape)
1343            y=nonsymmetric(x)
1344            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1345            xx=numpy.array([[-0.81231668287111436]])
1346            ref=nonsymmetric(xx)
1347            res=Evaluator(y)(x=xx)
1348            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1349        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1350        def test_nonsymmetric_Symbol_rank4(self):
1351            shape=(5, 6, 5, 6)
1352            x=Symbol('x', shape)
1353            y=nonsymmetric(x)
1354            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1355            xx=numpy.array([[[[-0.87611381274896494, 0.64084908360843329, 0.94971251072772067, 0.15496952997452684, 0.068460260139867168, 0.11264684315944873], [0.73979629158557469, 0.80828078666893277, 0.69921713970335597, -0.14749070685347099, 0.7441521893365024, 0.61548151079953128], [-0.52810391671544132, 0.75268599232938005, 0.57099525595282419, 0.78455694374665219, 0.27027013026661817, -0.39006842741665948], [0.70566615543150912, -0.96110664185626815, -0.59956372616677189, 0.47552547539045631, 0.38013232187569734, 0.17081466188492245], [-0.97157201678990956, 0.43229949178208393, 0.2143034754119153, -0.16330988760006049, 0.56783537173895171, 0.84762036160156362]], [[0.084427924914955099, 0.58687163761251071, 0.048623960448611836, -0.6143433562928553, 0.83889139190041662, 0.11462546478479418], [0.87264716105891837, -0.72471161960490527, 0.65683669832772429, 0.48369518937375466, 0.49267031558890362, -0.70139524332654912], [0.50978042080358854, -0.54237404263272282, -0.36439070925769457, 0.74861475912008779, 0.54265600745686404, -0.57080040007909405], [0.27495061607322802, 0.3857639219903386, -0.013728392180178961, -0.38798005297873916, 0.034099960777301375, -0.2933169525447914], [-0.14325729599190917, -0.45034435650037352, -0.90140040912365649, 0.73346057167497691, -0.73635328815941725, -0.040202543638502952]], [[-0.0064177036510466579, 0.72335334254458417, -0.57187664768558988, 0.54747431198206087, -0.78468789412090056, 0.28316807338596583], [-0.7012810789431656, 0.056420440089278046, 0.25612197762738509, -0.46803354940034181, -0.25411765275565301, -0.50291154394448623], [0.8746544829878069, -0.79984251020281438, 0.23838147427605416, -0.3478411828200445, -0.93707530927374449, 0.22835053727961774], [0.83188765942559861, -0.75576363553855774, -0.43319595555336887, -0.35368473485377483, 0.058032610015694264, -0.63261298821224865], [-0.13182912933606583, 0.88270252189898146, -0.55608536138433573, -0.055458565563316631, -0.98074797953836224, -0.33368578435335006]], [[-0.65037196792974283, 0.95989776572693231, -0.7363456508877968, 0.51358219390705195, 0.094487645971377265, -0.76354846635518392], [-0.38546353716757276, -0.91503384821396483, 0.42418979630392872, 0.84706987816207602, 0.37907656604193551, 0.24441124806121484], [0.43290516677160307, -0.19172804785493747, 0.43475129167612891, -0.13493232398335908, 0.21147130694799365, -0.65559946788913548], [0.68696189365091231, -0.037695405275463667, 0.40309879322198294, 0.9930415020193617, 0.39019048417347668, -0.74659256237646643], [0.028681875548546731, -0.34594450482122929, -0.83384588229923984, -0.0090384081706393893, -0.18473385897240169, -0.07015301293647247]], [[0.18679937053209339, -0.70641913582105698, -0.2885047136862553, 0.025447470385290272, -0.60451536925890492, -0.088116242491905972], [0.77554202276267326, -0.6957432935398602, -0.6072043758002692, -0.81845106964517367, -0.013489119028041063, -0.77651672487138979], [0.016331675637332621, 0.84488313852201191, -0.23827606021037862, 0.77096010793201231, -0.72207076553668803, -0.27745990797087927], [-0.82025136799805565, -0.62153620483800665, 0.78934339289970268, 0.90843441071559772, 0.19444035161605333, -0.51808534523291261], [0.89251058043090437, -0.51113448814442153, -0.75148759096619222, 0.79074127373529257, 0.62045925984014794, -0.70044796146071575]], [[0.82284718847205651, -0.59167277293910181, 0.85926870816682466, 0.69949338482497736, -0.85092650233379707, 0.96064173776846062], [-0.41965402128561569, -0.71707129474841391, -0.81439218292545856, 0.28959167219270343, 0.35283448394849426, 0.28734860586747679], [0.26930701073879471, -0.68236156895709699, 0.97802995167740825, 0.56898242707065649, -0.95371774729358605, -0.49238960528695319], [0.0028815519190936723, 0.25573403649043525, 0.50398375067739498, -0.86368459856760049, 0.95880132246760219, 0.71778420562947387], [-0.2007835536468352, -0.50039904674810542, 0.58116162587360187, 0.43408510241775078, -0.4818614385883877, 0.10161453292730882]]], [[[0.75032365142867663, -0.94597876002107162, 0.27812743743538415, 0.41895904607669254, 0.8862004211643042, 0.60288071371596286], [-0.57677959402362622, -0.76256330554800167, -0.79311165066956546, -0.41353759746760366, 0.060239587681902629, 0.91483752675619767], [-0.2465034079242252, -0.27862287433414701, 0.16272598061047083, 0.19538302362518856, -0.358039287052351, 0.30052746727274537], [0.0438043124170584, 0.66074409636709297, 0.36516083952029388, 0.47034778976641012, 0.66119091858463919, -0.77417430386497621], [0.61226557988771568, -0.46560569392529727, -0.16413985983618673, 0.60576512415240114, -0.20150908463341133, 0.13921226992406299]], [[-0.21269028193523898, -0.85655383793183759, 0.12951362106345798, -0.98106966855968292, 0.65675081572674809, 0.37851323917381663], [0.6915579733554571, -0.52217595873092715, -0.32685216128891748, 0.62218975188600023, 0.96554033639297066, 0.63852427547139667], [0.2199197865643836, -0.52631350348362749, 0.11636499386388222, 0.7179518117421877, -0.051479894193612319, -0.26229965739986461], [0.83191068523243494, -0.63195835463630523, 0.99676341886077702, -0.18403398213792532, -0.64641438965799747, -0.79988159027913963], [-0.26018824191835144, -0.95458908718043634, 0.099209264672524444, 0.70706710742929846, -0.44425602284242016, 0.89924783632714966]], [[0.60711516997766801, -0.65173739927053265, -0.12180936688473643, -0.99718800009773445, 0.93156499341563714, 0.16522802930170921], [0.74080775869445481, -0.44441964539836687, -0.45974566791069438, -0.38641020281447003, -0.10164202185872884, -0.43813698004408841], [-0.21317824673019792, 0.12556318930443422, 0.28361897841805961, 0.11600501248777406, 0.047850152773347032, -0.32171253784140208], [-0.99935809926111707, -0.51605525163232757, 0.18237424166425753, 0.029838344764782754, 0.51254217007650205, 0.25319067623762126], [-0.87622067250260405, -0.8481128356804708, 0.45137459717779294, -0.12151480629236855, 0.71459163492889521, -0.084412959501667606]], [[-0.17191338811000101, -0.59295021564672545, 0.73343504758381961, -0.93984029618435616, 0.46945185680752255, -0.15272787556538292], [-0.73491812492016217, -0.39939133671541005, -0.54208423990018506, -0.60312043376004976, 0.68182347495961282, 0.81611758353879971], [0.1717358200148178, 0.066884838463589169, 0.40114383552456001, 0.58227195559263256, -0.73399292795915572, 0.62894475778402503], [0.99186469042308523, -0.4021865130176252, 0.072158837042100243, 0.28404445558623892, -0.2105234483077838, -0.42675299612200135], [-0.94985696068432945, -0.2990858315510474, 0.98650857570993389, -0.0030509919576788835, 0.52451481773108166, 0.039355544042572355]], [[0.81153397640763281, -0.23537161708943022, -0.08284671403641708, 0.70339125550572001, -0.15450167302977236, 0.90536889643217067], [0.15244340143333934, -0.63771380922325749, -0.33150964726198273, 0.39826030299859738, 0.88124420590269414, -0.28495340018593951], [-0.44217851423139654, -0.63855768155987658, 0.93150688556859418, -0.69168931122851829, -0.15885216337278596, -0.9723047883421061], [0.59699511459221632, -0.5217502494096371, -0.29410330404937812, 0.88131468491175768, 0.70243622344394896, -0.32349433543567474], [-0.28418568077289086, -0.34235787482968005, -0.21463559272753563, 0.064871283868694229, 0.56144210240324544, -0.38312849493161205]], [[-0.82721783642104207, -0.79268672711468913, -0.47559249859847852, -0.35437139090060987, -0.34939177926009157, 0.15734725235620539], [-0.67041834253552257, 0.7630166957118143, 0.6515507128749578, 0.97312015740646718, 0.11446001939726114, -0.058153640233599369], [0.91124080303497457, -0.7764574736567138, -0.33850491141012129, -0.38827621073946883, -0.75760273047555571, 0.38414637564163745], [0.30202567275075043, -0.27432500508173097, 0.89660111679656662, -0.27852338224283568, -0.062672889716266056, -0.11938664495782847], [-0.91068255335030202, 0.055602783828616609, 0.49767917107095383, 0.12290236922903586, -0.31448158911459223, -0.58884771180083528]]], [[[0.93625146831753647, -0.0094403026067120255, 0.80337476226176818, -0.59463114243041382, 0.79901587132530305, 0.7785381951773136], [-0.9838528799180255, 0.11625268747844308, -0.62458475377155742, -0.10486154571743933, -0.27220257068519249, 0.47493432417638792], [-0.924001900686652, 0.9951244112330091, -0.62188371305334589, 0.67966502327599998, -0.70783697019641845, 0.29850462389682408], [-0.31394573923605673, 0.088858826781420097, 0.75392740836645467, -0.83489553545440121, 0.91363410790971833, 0.72447052239792753], [-0.81651789380421214, -0.4424853014106398, -0.28607752820757515, 0.81263927283705817, 0.28638123558065764, 0.35628337556867318]], [[-0.002658523286944714, -0.079505938810717547, 0.30580773543185957, 0.8600792388073093, 0.50781453830840473, -0.46548302391474006], [0.72370150139185441, -0.23009024503271402, -0.85206923894795317, -0.56441007904945883, 0.59717652525913345, -0.4406997331224507], [-0.36320251422121252, 0.47844416554129987, 0.086932663542413913, 0.24300190778524877, -0.58720890062069642, -0.68754968855534804], [-0.32309678416389587, -0.045738240874976466, -0.11902303977460993, -0.61084327065543187, 0.42570420025583156, -0.16254051311551754], [0.29862108900701267, -0.42148270419243339, -0.43755720282552302, -0.80254542317049626, -0.90321571834497405, -0.4239566592145938]], [[-0.72255803849358347, -0.35554605246877857, 0.24537370918829882, 0.70242034329706105, -0.90292608569373622, -0.59147883349459685], [-0.13641389050800767, 0.80441796787478825, -0.78476887404350903, 0.79970520735559569, -0.34724379038283404, -0.52732367731474761], [0.76929506136271208, -0.88127686296171315, -0.1517681590712987, -0.9688206697793309, -0.61438079353507113, 0.2816447885662523], [-0.74169615671913736, 0.51848938874209538, -0.96974634733045995, 0.73226281109865754, -0.042427117570237316, 0.29081556162505584], [-0.44860399655463534, -0.89745942535467638, 0.29029843080196804, 0.97498064816381858, 0.67575147294719384, 0.16665422873580593]], [[-0.35700062508392127, -0.23199007648737369, -0.11460416793066952, -0.15009914353656639, 0.45246462847535063, -0.32633729385789589], [-0.88580385009630525, -0.092622865025415946, 0.83193964199110826, 0.99616325118004245, -0.32533927857274536, -0.57680819304581132], [-0.39790911331940393, -0.049729623068768269, 0.93416377036775788, 0.96655889730945099, 0.74186462223881366, 0.45261673423586668], [0.71396794466115021, 0.13723774819054069, -0.95145141760006635, 0.36750573797446795, -0.9319553100903617, 0.68170496778050338], [-0.076153754993744105, -0.28526593384025989, 0.19249121111310541, -0.78542484620205988, 0.8434500416889168, 0.36147012929175615]], [[-0.97759435861614952, 0.2637456674831602, 0.43563687414865027, 0.70732528626429558, -0.97231015101677931, -0.22015595811443633], [0.58219330799719704, 0.26512804973928072, 0.87243920577620426, -0.46825827655332142, -0.61157878450082781, 0.66390574430126947], [0.99061979375563003, -0.27785123249912358, -0.53223031121982989, 0.29249654913589507, 0.13689418621928806, -0.57146378274408827], [-0.97239650667991495, 0.43769466002075053, -0.84185208417299018, -0.4622257761676567, -0.79495591663993648, 0.52365540243475772], [0.80213335284784271, 0.19090197736632408, 0.76607961935125091, 0.80301925079537795, 0.68695444492984303, -0.78376343500139201]], [[0.61298870417906337, 0.32609146690181801, 0.45013748163197453, 0.29171733151375823, -0.059935678561255701, -0.77990385241972149], [0.93953951595530016, 0.27723218159564045, -0.70515274122789307, -0.51110351426128364, -0.024085766494907013, -0.46280998755487657], [0.12960983281769867, -0.14796654569653755, -0.92590688173270563, 0.59404413106639753, 0.22267442109838687, 0.89169613200367848], [-0.68381405291728869, -0.59301143480545671, 0.9664517816395215, -0.19282681675905078, -0.71166858558083579, -0.37154387770631292], [-0.20609009959999436, 0.054847098928429983, 0.6078851320935561, 0.10396105828208047, -0.69151184308551139, 0.67781864817726412]]], [[[-0.94661369837466358, -0.40657766168139076, -0.28588171109662341, 0.24471000514482077, -0.69237634506685297, -0.39087890183759089], [-0.90651306113844288, 0.83290618009538497, -0.66346332205874425, -0.18686960450625789, -0.318616605907867, -0.25228320265891235], [0.88412614303152481, 0.7911952965334812, 0.8199484332806295, -0.21155979513545176, 0.050759723666337075, 0.44739871002418896], [-0.52815330030021101, -0.36474332102694151, -0.3112582914486075, 0.50987311354299814, 0.90414413419693207, -0.63004053863513398], [-0.26220982060072973, -0.60659015699002494, 0.80611801481670753, 0.39130704276382011, -0.89373650680786887, 0.7104127760779364]], [[-0.01605725053998297, -0.97743733193976268, -0.39888117921471711, 0.4992673696372818, 0.88868094337139558, 0.30361347408479666], [-0.38500332857906505, -0.51232562777357948, -0.57343824052516257, 0.7390966436967592, -0.85244234759352677, -0.18475873788371988], [0.05332349571310413, 0.3638256570749816, 0.027927413767144582, 0.2606639811228888, -0.19653603808033382, 0.23623484325596178], [-0.9984723614171791, 0.39712150340294694, 0.57304703032492665, -0.31569349012537962, -0.81582601444003311, 0.64594332000066901], [-0.82128734605187814, -0.43186749614152431, 0.28869152955715061, -0.93236845140395275, 0.33451029705223467, 0.084651764255883055]], [[-0.6034857845492041, 0.48975202302025367, 0.040953750094797403, 0.99636476884417546, -0.6018056968725658, -0.39825360750539529], [0.61878385799364888, -0.54972014958279081, -0.65413813406439902, 0.66765019400698944, -0.50739418442226336, 0.97933478955364262], [0.22813702762446053, 0.32896125564698253, 0.20188269442039908, -0.039776904395476986, 0.6234413955224487, -0.022273537732076409], [-0.30932159828910022, 0.53603044019122126, -0.021341688264543857, 0.78411524431242885, -0.003364405215609434, -0.00062507332794470294], [0.48237689474820922, -0.80925869881951762, -0.90080460000457929, 0.82807957839458934, -0.88758895612176247, 0.063187428334408713]], [[0.32858520323495632, -0.45120170801555926, -0.89235362645718586, -0.031104149586698604, 0.035674630951878505, 0.084072694589781394], [0.36219218964410937, 0.83465314604678409, -0.26939451911632339, -0.45960712055105901, -0.66309265652378979, 0.21303268737416592], [-0.90908016446335504, -0.23130247793809811, -0.62285786222017503, 0.7498338947473786, -0.67805104495510027, -0.49978619834234106], [-0.58962688174368094, 0.2936461242882793, -0.073207686001991013, 0.95316113410087899, 0.35594738600758591, -0.28502416514438589], [0.63470018589592647, -0.59205223835316256, -0.99500909663263282, -0.40036360989316999, 0.066439847917586059, -0.34160342329334936]], [[0.51724606461989775, 0.93601611830788478, 0.28921437171866504, 0.40282887804566658, -0.20124173575964677, -0.22573680005369545], [-0.21842235747926497, -0.95042796889020242, 0.71270520978919616, 0.42586978231295758, 0.98526453016734106, 0.77944708167358323], [0.97921943145806023, -0.44641060603747107, -0.47010053456623413, 0.9464879633663672, 0.75092447120531935, 0.33209470344965686], [-0.47348115677065072, 0.33420256023572081, 0.94829400202182246, -0.3870034812942349, -0.28068768315932058, -0.7782116842636313], [-0.40565168516948891, -0.21798724951304749, 0.87243471338058365, 0.24258361784756133, -0.75185813227107978, 0.019459239236987003]], [[-0.76041236453565575, -0.50204622099870599, 0.31165790715958663, 0.85144630071188487, 0.16546260314237204, -0.91907145992274253], [-0.52040546182708591, -0.99633506607993771, 0.70918349649152468, 0.1506404775689425, -0.27674864881953232, 0.29682148669990438], [-0.97456555467797124, 0.89423565222339696, -0.74663075187643457, -0.017953126321285318, -0.3288840638947268, -0.41626308466007345], [-0.43021290888322783, 0.96328533930683657, 0.88674201773443451, 0.071991404578504392, 0.84906637238371352, 0.90865780940672036], [-0.048776896705082118, 0.48337587830399142, -0.23566950478101178, 0.22983208819015477, 0.84794981757835775, -0.33507449998474659]]], [[[0.82275289107719418, 0.34224360285089106, 0.19482808760498305, 0.83434595024891745, -0.64056567736458181, -0.019233315233576409], [0.28816831750508465, 0.0099530613713001426, -0.55508593881288348, -0.61194130860491769, 0.67139145388307098, -0.93097286510122035], [0.29052224789808179, -0.76823735521100955, -0.83508803893627492, -0.78504144700962097, 0.14683360886732322, 0.32288659060834934], [0.1004212435296421, -0.90236516853809445, -0.81625560207318637, 0.52795614645743671, -0.26106790514433142, 0.86564890922062787], [-0.53846164160087273, 0.59588268399185074, -0.47250909946334363, -0.68472137051415971, -0.96105912494672863, -0.77930361748620824]], [[-0.066968685488735913, -0.43626742416542741, -0.91172162310998139, -0.10416885808883536, -0.40644244858757395, -0.19215240616697438], [-0.84237915856399082, -0.61464645235428028, 0.57375228633696795, 0.70133721183485531, -0.99432772066411412, 0.12579954023356565], [-0.16210374005596373, 0.49854751593457269, 0.73142695207679265, -0.967916049035626, 0.096170055949112099, -0.16128769997968306], [0.51051769655033286, 0.10772010066845228, -0.81211001864358257, 0.47745733126493506, 0.91954745808729177, 0.1773396669682108], [-0.58621735735711633, -0.87662414956629053, -0.80111580505020985, 0.78015513033282757, -0.037026166222301704, 0.46376666821189305]], [[-0.0015100951455513378, -0.82315734612630242, 0.58734027692485924, -0.1866061157822827, -0.49288597163563685, 0.58957358655953351], [0.092289388260557326, 0.84839789673877952, -0.21748435738509997, 0.17956096877998085, -0.18191481740141868, 0.37755892345586162], [0.66354592266141355, 0.57181652232164892, 0.64730538265286164, -0.099920448138942852, -0.20056364289981987, 0.58541950134908949], [-0.17665443154594129, -0.99499170845106288, -0.78638312580197378, 0.65055252896325744, 0.73650774506496308, -0.58116005190539877], [-0.34116048126062104, 0.61397096168330223, -0.2733607490804868, 0.53315788289177024, -0.14200231936103203, 0.073787294460491593]], [[-0.60930793462584432, 0.81297986760684915, -0.40008939854468406, -0.52495294538061588, -0.45438948493686326, 0.988954858355791], [-0.4776041321764688, -0.20072301276029458, 0.67479509876289478, -0.56677252670626266, -0.095809913209736752, -0.74375817346871442], [-0.37005268169425642, -0.24572409406052675, 0.71369218459379136, 0.95962826737524698, 0.96473617000749146, -0.78645121446035127], [0.64854292209443942, -0.44918000112261769, -0.77980115426808938, 0.11711180259132226, -0.60376762194112388, 0.80912751953823236], [-0.22704073389682877, 0.02210732777487423, 0.23536686192753242, -0.35279320560379301, -0.13360912261150903, 0.45094085030958952]], [[0.44970567132802031, -0.87816503255540401, -0.92665893069683158, -0.91256727164154738, -0.77402620933288735, -0.30140026376947326], [-0.49968028479210469, -0.75567943165078932, -0.39812780183641783, -0.060165068663369459, 0.015559392432227703, 0.39151852743193793], [-0.60598569513731793, 0.11823753215751642, -0.98245846739296816, 0.82126761785295144, -0.59233291037803659, -0.50934612365280096], [0.17627703013049811, 0.21518720995523166, -0.46228460494756707, 0.69442124395020044, -0.62634474588701683, -0.99401512753014254], [-0.89647170955283428, 0.62476250692837776, -0.73199233844806533, 0.961389908171705, -0.23754747259665221, 0.92667424690122169]], [[0.83685459668817908, -0.60431273407951225, -0.21534304898594869, 0.34124388325251109, 0.22743636934436817, -0.88921496779821041], [-0.2269653985770681, -0.5639101678812708, -0.1815990471729394, 0.1937106062817231, 0.11179142335947123, 0.50071086128426878], [-0.89475869335730751, 0.894752380449094, -0.36850459991996631, 0.66280846615620526, -0.36726384303958159, -0.97210798314245062], [-0.06731239965166913, -0.63631017713333726, -0.19859831759530056, 0.82658330465103402, 0.61774555748092697, -0.076542303055015193], [0.39188538791775018, 0.86209648718309118, -0.29730889865738397, -0.12979359877986418, -0.2506525917450606, 0.87427628278710134]]]])
1356            ref=nonsymmetric(xx)
1357            res=Evaluator(y)(x=xx)
1358            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1359        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1360        def test_symmetric_Symbol_rank2(self):
1361            shape=(4, 4)
1362            x=Symbol('x', shape)
1363            y=symmetric(x)
1364            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1365            xx=numpy.array([[-0.46792834938698458, 0.045147821991970982, 0.96674152032174154, -0.17847128296337367], [0.36127109484785125, -0.64962104789778619, -0.45818358602109255, 0.4842481004321797], [0.23531324920146557, -0.44743006966516874, 0.68551427286430466, 0.38559441812728079], [0.73635940442472836, 0.28489279342520124, 0.29499061276398142, 0.3199242841186285]])
1366            ref=symmetric(xx)
1367            res=Evaluator(y)(x=xx)
1368            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1369        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1370        def test_symmetric_Symbol_rank4(self):
1371            shape=(5, 3, 5, 3)
1372            x=Symbol('x', shape)
1373            y=symmetric(x)
1374            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1375            xx=numpy.array([[[[-0.80635606764162016, -0.11177758581999231, 0.62547687714245126], [-0.53183124611565558, -0.44552486532223723, -0.69409867941843251], [-0.91063181827153006, -0.50494231082043117, 0.76087041350098805], [0.87288254697945011, -0.24311983726866004, 0.66991231648290128], [0.0079165600076596121, -0.51686234434648126, -0.9693536865875223]], [[-0.88970284892057871, 0.033084057992284865, -0.29186190375261201], [0.1092522384189496, 0.46496784313854356, 0.82187713762205195], [0.22980491008242421, -0.2065397313607642, -0.88781001768355949], [0.97444496288339488, -0.36631281409151839, -0.22661771825523691], [0.10657573231488282, -0.9745868878485433, 0.4379206849451871]], [[-0.93707383161444668, -0.85353361035842479, -0.69281855366905498], [0.09224269695137588, 0.65195436215257541, -0.24062687130631488], [-0.59485122627354725, 0.14099353818243943, -0.55586107393946982], [0.2629832475730316, 0.94015884879079792, -0.41582446239908588], [-0.14758137480104949, 0.97672695828367839, 0.76704056760845263]]], [[[0.30069394589700527, -0.69795955431587453, 0.67489051669529476], [-0.24025012662318801, 0.27102510867429364, 0.76205316568183123], [0.034444442862595404, 0.20802913527389855, 0.90475029084120129], [-0.97438677286659381, -0.77617456232872795, 0.17759043969939614], [-0.63547684008896543, 0.10819143030934297, -0.52858617691027798]], [[-0.5181232109512961, 0.36228943045020445, 0.037931654234922618], [0.11006591193969162, 0.44874273710160884, 0.29101763774853073], [-0.12943284053513526, -0.28101670895959807, -0.1584555062730324], [0.74741671044682767, -0.78164315616971436, -0.51191408313455411], [0.3572607756698607, -0.97483835131597862, 0.19816333690352206]], [[-0.36925593164384796, 0.62626809452738041, 0.75939204178643105], [-0.96404111223803102, -0.88573988032165585, 0.88906345078138282], [0.82510062191559674, -0.9606334539439938, 0.24775815128495493], [-0.49511080939083851, 0.8993703352517548, 0.27607087504723538], [0.92178557151378571, -0.21614900530006143, -0.76867536974330886]]], [[[0.45393057017252314, -0.47856676088175254, 0.53750196543783169], [0.11845460979574529, -0.27725306400485672, 0.58929253114981983], [0.88369319037935834, -0.4893822351777799, 0.404973479760524], [-0.086201429900541138, 0.57888860660176267, 0.31525355740316297], [0.14319918714021762, -0.47531372000361105, 0.55562118802135774]], [[0.40012037870305583, -0.41529082057160749, 0.35096159045439013], [0.73184471854143829, 0.55947850634386809, 0.26342262302211283], [0.54517605393845181, 0.79801864100496411, 0.88088949294028884], [-0.38210715070419288, 0.76548798358020109, -0.78773747688574414], [0.60148010540275498, 0.63687823468389326, -0.8695524852758818]], [[-0.70029346410610116, -0.1213103965160971, 0.41208098869593779], [0.78875615839465141, -0.8061791754090708, -0.65968949562998835], [-0.17489456358071576, 0.8889755686870533, 0.32319991339818621], [0.22411999904874524, 0.46488935146636612, 0.85549240335626009], [-0.92731917590337676, -0.68774505876567527, -0.63143701190553059]]], [[[0.60033914846818304, 0.05334283970282927, -0.25203935786680565], [-0.98574859052466968, 0.23734940381270064, -0.98128944716059774], [-0.11321882751663748, -0.27653177668559814, -0.7056544826901332], [-0.81714880486416552, 0.11772873195959366, 0.24169169765987863], [-0.43420763714591692, -0.63257360100814752, -0.22918427218574999]], [[0.78862416638192467, 0.11358512719176561, -0.15650112857300535], [0.075136425007972685, 0.059458513605276098, -0.75187283857419196], [-0.99529193072341715, -0.93933008640440119, 0.69703959228427581], [0.73412749967764079, 0.13688759254419414, -0.67790559540033946], [-0.93528515588189753, -0.80775677411485858, 0.98291861771065081]], [[0.90045204149384395, 0.38437121467974933, 0.89787430976858684], [0.91536075553236063, -0.34865971103281668, -0.10030585674989734], [-0.96871566635509265, -0.51208816834447979, -0.30408626044858633], [-0.34393906447142419, 0.12879529036399084, -0.28627599671042603], [-0.72415307510705507, -0.62910544055314821, -0.25251318916277898]]], [[[-0.41779654827375112, -0.68222702544726488, -0.96847858652761087], [-0.14845945234293256, 0.5584314928708296, 0.67263454055372285], [-0.66127551458659317, -0.88547235576977035, 0.15476075101802156], [-0.52768254348246901, -0.34314725544478519, -0.2995119087593483], [-0.9481878362678986, -0.81535959017241888, -0.23057603494431733]], [[0.38804350887859118, 0.71622191157935244, -0.41508385210903342], [0.77206336306591261, -0.57065715785978077, -0.64216019389219081], [-0.96925585148719029, -0.052139973231341896, 0.65039651284185207], [0.52857106278509458, -0.14851113543744798, -0.64922062559112836], [-0.68839250477655378, 0.65968950792513392, -0.97776304174268791]], [[0.63172298904406898, -0.88212694236877542, 0.073875315784365903], [-0.2789793676888217, -0.81321613376162416, 0.95265811385587917], [0.0097725426277024408, -0.2753241741395045, 0.11253461394996944], [0.8826977470306534, -0.9597128322808457, -0.17898342439328041], [-0.80059693164743395, -0.34075072465916922, 0.831048319563918]]]])
1376            ref=symmetric(xx)
1377            res=Evaluator(y)(x=xx)
1378            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1379
1380        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1381        def test_maxval_Symbol_rank0(self):
1382            shape=()
1383            x=Symbol('x', shape)
1384            y=maxval(x)
1385
1386            xx=numpy.array(-0.536961062572)
1387            ref=maxval(xx)
1388            res=Evaluator(y)(x=xx)
1389            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1390        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1391        def test_maxval_Symbol_rank1(self):
1392            shape=(5,)
1393            x=Symbol('x', shape)
1394            y=maxval(x)
1395
1396            xx=numpy.array([-0.96295467048775607, -0.23109517912761235, -0.8071533993829485, 0.21957942007641384, 0.058694114271927944])
1397            ref=maxval(xx)
1398            res=Evaluator(y)(x=xx)
1399            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1400        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1401        def test_maxval_Symbol_rank2(self):
1402            shape=(3, 6)
1403            x=Symbol('x', shape)
1404            y=maxval(x)
1405
1406            xx=numpy.array([[0.48972575874879909, 0.49398944080879814, 0.021748982556587526, -0.79160796554380797, 0.34690195097872834, -0.81373170812824558], [-0.78489669235134074, -0.88410918736489852, -0.40722492573226021, 0.77862057976100729, -0.24609781167558187, 0.045128795464719929], [0.28771222409714015, 0.55760479157666576, 0.97982137290269167, -0.64248278563212757, 0.30985570299071874, -0.60195740046567825]])
1407            ref=maxval(xx)
1408            res=Evaluator(y)(x=xx)
1409            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1410        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1411        def test_maxval_Symbol_rank3(self):
1412            shape=(1, 4, 1)
1413            x=Symbol('x', shape)
1414            y=maxval(x)
1415
1416            xx=numpy.array([[[0.85763256773047791], [0.63102414833823217], [0.79081114096988459], [0.98266504616740602]]])
1417            ref=maxval(xx)
1418            res=Evaluator(y)(x=xx)
1419            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1420        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1421        def test_maxval_Symbol_rank4(self):
1422            shape=(4, 5, 2, 3)
1423            x=Symbol('x', shape)
1424            y=maxval(x)
1425
1426            xx=numpy.array([[[[-0.77107601438326356, 0.65255657434775283, -0.93158389513641637], [0.11399799893983609, 0.85573506951949851, -0.79378805621728854]], [[-0.23031913444734675, 0.11677313942504042, 0.33546188255596987], [-0.97839076852341988, 0.16365342524312787, 0.62977964804384112]], [[-0.77622030195937208, 0.17113293778886218, 0.53940779687711427], [0.95555159982764382, -0.92940035554865785, 0.52051734890560319]], [[0.45284408667200315, 0.7871131922862078, 0.8983873497639201], [-0.25935688538324064, 0.56573723809894139, 0.87872314794305351]], [[-0.24028346690271962, -0.75005902310461292, 0.68777993385329705], [-0.4313247231788655, 0.94366920573050761, -0.80685800769093707]]], [[[-0.34518608229054082, -0.50033899868723375, -0.3665712288517966], [-0.34054054239881393, -0.44639955430006961, -0.48839496653227377]], [[0.70728281629701018, -0.68227728638961649, 0.30306944342704423], [0.043910549173603153, -0.54631008927453539, -0.0053771817049026449]], [[-0.29241243057089883, 0.19915422674009564, -0.51121559994272436], [-0.63687591305960289, -0.65051888656542545, -0.5093469817555687]], [[-0.93906097061519644, -0.32061527433913883, -0.20252627146606716], [0.46202139708103784, 0.25695436574868658, -0.87949584230565914]], [[0.22854370153289416, 0.32828514712926915, -0.13603650740750872], [0.67835171897504432, 0.2662074855320069, -0.72590066315010837]]], [[[0.24647048806321825, -0.88106958633266363, 0.40831937531327922], [0.26275973208647474, -0.42920122675131678, 0.91922194147240099]], [[-0.28561856894864324, 0.98807638767841222, -0.82242623658545155], [0.79210957914499902, 0.55915000191933428, 0.86997449004676097]], [[0.39706252562270583, 0.46921844133096102, 0.36256864145602341], [0.36449607919792593, -0.049076904773179608, -0.0085125384155226858]], [[0.90280866937145698, 0.97678035001494012, 0.5333621573318359], [-0.876338999384215, 0.67142832179201961, 0.0035643194763810282]], [[0.80777202083394117, 0.076867661805710918, 0.44520511974373789], [0.28700447465108359, -0.80278327086419687, -0.88462687263812478]]], [[[-0.72839406698310438, -0.63946294028339601, 0.34045388669213272], [-0.23640451216926173, -0.16333252093856054, 0.5115552032032431]], [[0.53119268710858192, -0.069917563624526169, 0.0033100305136193331], [0.52007656626176146, 0.34611048489775409, 0.86016552636699362]], [[-0.3645051848252292, 0.6515162974466675, -0.7370727481735535], [0.13121153655411555, 0.77273867581534161, -0.89525655433028595]], [[-0.022217143875165934, 0.21789063919205565, 0.83504681168319794], [-0.31066701900530824, 0.63538494034356896, 0.50183868234915074]], [[0.69886742326226226, 0.92464262427135901, -0.32058306251229274], [-0.94848050428712982, -0.72689042914588176, -0.1895189451382433]]]])
1427            ref=maxval(xx)
1428            res=Evaluator(y)(x=xx)
1429            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1430        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1431        def test_minval_Symbol_rank0(self):
1432            shape=()
1433            x=Symbol('x', shape)
1434            y=minval(x)
1435
1436            xx=numpy.array(-0.949178977805)
1437            ref=minval(xx)
1438            res=Evaluator(y)(x=xx)
1439            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1440        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1441        def test_minval_Symbol_rank1(self):
1442            shape=(1,)
1443            x=Symbol('x', shape)
1444            y=minval(x)
1445
1446            xx=numpy.array([0.45528479821899914])
1447            ref=minval(xx)
1448            res=Evaluator(y)(x=xx)
1449            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1450        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1451        def test_minval_Symbol_rank2(self):
1452            shape=(5, 1)
1453            x=Symbol('x', shape)
1454            y=minval(x)
1455
1456            xx=numpy.array([[-0.41661908195103492], [0.0096980024511226226], [0.80098576195237681], [-0.68569971975207422], [0.34489299842055399]])
1457            ref=minval(xx)
1458            res=Evaluator(y)(x=xx)
1459            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1460        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1461        def test_minval_Symbol_rank3(self):
1462            shape=(5, 4, 4)
1463            x=Symbol('x', shape)
1464            y=minval(x)
1465
1466            xx=numpy.array([[[0.24468432281577868, -0.80621034265089553, 0.30588310363980931, -0.38010170067894844], [-0.36554502871710848, 0.45199347573214399, -0.43796451716675677, -0.28312682807127199], [-0.240749751444854, 0.22376087143426071, -0.72709614004779866, -0.2998096909135719], [-0.1531260911136072, 0.71282599379510647, 0.58491966112546212, 0.46277678730332905]], [[0.81019187891840971, -0.78742762583893344, 0.54381449306731344, -0.17824674699208254], [0.048677743670231033, 0.0094409833969215651, 0.52024696176142249, -0.99135409582425971], [-0.12526128430344485, 0.98219970205401941, 0.69339198256359347, 0.17174945292067467], [0.25620186985220039, 0.2755128824386448, -0.10355063338460657, -0.40082248448969438]], [[-0.23826117101181032, -0.21085315335966803, 0.35060404130401901, -0.74700425129159265], [0.48260208572666219, -0.97053557721514228, 0.5086420403736287, 0.13139275039077347], [0.028026313704564432, -0.42404164657895627, 0.22387327352724928, 0.74310379037857111], [-0.46378982888004994, -0.50302368999050406, 0.78218247847426481, 0.99216241594762322]], [[-0.73273265912981222, -0.2542144913113058, 0.02987100728025327, 0.98089662534354272], [0.67435706372512527, 0.31792581022384536, -0.83569334083633962, -0.40235359797121828], [0.86409510748628682, -0.10651465407207317, 0.28822178449711577, -0.88649123796102414], [0.44243068902345728, 0.68397079665450145, -0.029352570967092095, 0.6723466176774755]], [[-0.64259530769905671, 0.65305819929203412, -0.89128661526883324, -0.0023180437163436984], [0.10620773730275967, -0.27918883172151632, -0.37748207892708163, 0.20535683105278535], [0.53884309498907612, 0.71997759093942948, 0.61052063508530585, 0.37977772915318786], [0.82283320437190977, -0.18883416065470393, 0.59226252202782192, -0.74758584225603908]]])
1467            ref=minval(xx)
1468            res=Evaluator(y)(x=xx)
1469            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1470        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1471        def test_minval_Symbol_rank4(self):
1472            shape=(4, 1, 4, 2)
1473            x=Symbol('x', shape)
1474            y=minval(x)
1475
1476            xx=numpy.array([[[[-0.18141214451639787, -0.17675249425365824], [-0.52642596129249597, 0.050739847932975257], [0.033659748801813327, -0.5728247223511691], [0.18240750707350717, 0.43069851813450111]]], [[[-0.84797296263572886, -0.62328511455011459], [-0.92009937949032583, -0.66567338535986642], [0.40107875207297838, 0.78371085543677088], [0.20119913221600982, -0.41476057328769556]]], [[[0.62347654709502343, 0.14285636075988251], [-0.95211037744019977, -0.94910709872028476], [0.23749698378174733, -0.010676163357491664], [0.78095448408407986, -0.45362067209504109]]], [[[-0.25630872354716061, 0.36299018454563803], [0.32324945357025037, 0.2929229986611015], [0.17002870539634762, -0.021938063254411722], [0.57702174063831446, -0.59189647827134206]]]])
1477            ref=minval(xx)
1478            res=Evaluator(y)(x=xx)
1479            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1480
1481        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1482        def test_eigenvalues_Symbol_dim1(self):
1483            shape=(1, 1)
1484            x=Symbol('x', shape)
1485            y=eigenvalues(x)
1486
1487            xx=numpy.array([[0.83927899524202787]])
1488            ref=eigenvalues(xx)
1489            res=Evaluator(y)(x=xx)
1490            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1491        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1492        def test_eigenvalues_Symbol_dim2(self):
1493            shape=(2, 2)
1494            x=Symbol('x', shape)
1495            y=eigenvalues(x)
1496
1497            xx=numpy.array([[0.98390058399077041, -0.89730106953254629], [0.043237832200195836, 0.67380162082607087]])
1498            ref=eigenvalues(xx)
1499            res=Evaluator(y)(x=xx)
1500            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1501        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1502        def test_eigenvalues_Symbol_dim3(self):
1503            shape=(3, 3)
1504            x=Symbol('x', shape)
1505            y=eigenvalues(x)
1506
1507            xx=numpy.array([[-0.65583331498545516, -0.17435184616020805, -0.90644759181987999], [-0.87436961254937673, -0.97100711278573026, 0.23318913589175772], [0.86308210733153401, 0.13835160459858065, 0.51947576162608233]])
1508            ref=eigenvalues(xx)
1509            res=Evaluator(y)(x=xx)
1510            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1511        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1512        def test_inverse_Symbol_dim1(self):
1513            shape=(1, 1)
1514            x=Symbol('x', shape)
1515            y=inverse(x)
1516
1517            xx=numpy.array([[0.76324916232796469]])
1518            ref=inverse(xx)
1519            res=Evaluator(y)(x=xx)
1520            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1521        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1522        def test_inverse_Symbol_dim2(self):
1523            shape=(2, 2)
1524            x=Symbol('x', shape)
1525            y=inverse(x)
1526
1527            xx=numpy.array([[0.53104006684518179, 0.92851144214279024], [-0.22257005986553069, 0.1011809153657055]])
1528            ref=inverse(xx)
1529            res=Evaluator(y)(x=xx)
1530            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1531        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1532        def test_inverse_Symbol_dim3(self):
1533            shape=(3, 3)
1534            x=Symbol('x', shape)
1535            y=inverse(x)
1536
1537            xx=numpy.array([[-0.79414991140960067, 0.24454952679087527, 0.043242346936605447], [-0.58306023031036558, 0.75134648631069445, 0.62423783959883949], [-0.95484191502619109, 0.024246711986980696, 0.026868527226753036]])
1538            ref=inverse(xx)
1539            res=Evaluator(y)(x=xx)
1540            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1541
1542        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1543        def test_transpose_Symbol_rank0_offset0(self):
1544            shape=()
1545            x=Symbol('x', shape)
1546            y=transpose(x,0)
1547            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1548            xx=numpy.array(0.783766816869)
1549            ref=transpose(xx,0)
1550            res=Evaluator(y)(x=xx)
1551            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1552        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1553        def test_transpose_Symbol_rank1_offset0(self):
1554            shape=(4,)
1555            x=Symbol('x', shape)
1556            y=transpose(x,0)
1557            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1558            xx=numpy.array([0.78112091243977932, 0.052524091637526027, 0.3810831018572276, -0.1735507041244464])
1559            ref=transpose(xx,0)
1560            res=Evaluator(y)(x=xx)
1561            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1562        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1563        def test_transpose_Symbol_rank1_offset1(self):
1564            shape=(1,)
1565            x=Symbol('x', shape)
1566            y=transpose(x,1)
1567            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1568            xx=numpy.array([-0.24474437045166741])
1569            ref=transpose(xx,1)
1570            res=Evaluator(y)(x=xx)
1571            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1572        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1573        def test_transpose_Symbol_rank2_offset0(self):
1574            shape=(2, 5)
1575            x=Symbol('x', shape)
1576            y=transpose(x,0)
1577            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1578            xx=numpy.array([[-0.56277672811866708, 0.9298454529201361, -0.22797452837158372, -0.030942868972557713, 0.73234257869948038], [-0.9312396454174372, 0.46998481588027352, 0.91517041255690335, 0.23275927361943149, 0.85575688817339413]])
1579            ref=transpose(xx,0)
1580            res=Evaluator(y)(x=xx)
1581            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1582        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1583        def test_transpose_Symbol_rank2_offset1(self):
1584            shape=(6, 2)
1585            x=Symbol('x', shape)
1586            y=transpose(x,1)
1587            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1588            xx=numpy.array([[0.97732528827085408, -0.55270312608993888], [-0.054386611225741621, 0.28729636282604742], [-0.61322381930806324, -0.71023511524566008], [-0.96150245128654022, 0.1634889183047239], [-0.21597705459799754, -0.13721347859211552], [0.4747895467021781, 0.22672996220901664]])
1589            ref=transpose(xx,1)
1590            res=Evaluator(y)(x=xx)
1591            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1592        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1593        def test_transpose_Symbol_rank2_offset2(self):
1594            shape=(3, 2)
1595            x=Symbol('x', shape)
1596            y=transpose(x,2)
1597            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1598            xx=numpy.array([[0.69766351290774087, 0.48488927041949936], [-0.15092833983813447, -0.64787040958647157], [-0.67435783121870663, 0.62887106998847941]])
1599            ref=transpose(xx,2)
1600            res=Evaluator(y)(x=xx)
1601            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1602        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1603        def test_transpose_Symbol_rank3_offset0(self):
1604            shape=(1, 3, 3)
1605            x=Symbol('x', shape)
1606            y=transpose(x,0)
1607            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1608            xx=numpy.array([[[0.68850252843519466, -0.84197443714372699, -0.68633303197153306], [0.57540988202551335, 0.78774645372836138, 0.39746856349766713], [0.7066612793229603, -0.78820366185511714, -0.10422811370935126]]])
1609            ref=transpose(xx,0)
1610            res=Evaluator(y)(x=xx)
1611            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1612        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1613        def test_transpose_Symbol_rank3_offset1(self):
1614            shape=(6, 6, 3)
1615            x=Symbol('x', shape)
1616            y=transpose(x,1)
1617            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1618            xx=numpy.array([[[-0.67196746378213312, -0.34710356553670829, -0.36022343205919194], [-0.40452357603741884, -0.17531248568128732, -0.70797707763303586], [-0.4477546186629664, 0.68306765350795362, 0.92164235538985317], [-0.2330611443110322, 0.76973133891415157, -0.54964395726305448], [0.74191716243732841, 0.96733094394390573, -0.10261064284188981], [-0.58417576859517162, -0.59067988173991348, -0.20855438030898776]], [[-0.051140822112997864, -0.8893661631575005, 0.3127834991529419], [-0.67557560123562022, 0.79175778091039684, -0.1557450831828826], [0.23673307885380956, -0.51144673580713973, -0.39718440085386408], [0.022904843837851407, 0.17818590036480253, 0.75553852386154063], [0.32657337223964689, 0.77586538849707765, 0.066274252159790104], [0.21569916012543877, -0.52546787893886693, -0.3433516090605333]], [[0.99613829319991098, 0.29972119351478499, 0.65369484718021731], [0.17679806833554035, 0.19278648560908196, 0.77317335998054681], [0.17500807283226649, 0.95084958004861186, -0.54412704861506911], [0.0086192732918886072, -0.9630632883849044, 0.25969985928830397], [0.22325825898747587, -0.71106367184670871, -0.5811220388238354], [0.51194176402087366, 0.99275326890983129, 0.24732405046028449]], [[0.2823055713116982, -0.24512970953589908, 0.36428498924055863], [0.86079361003109867, -0.44358773628728132, -0.99266837066020042], [0.40213999817589219, 0.097068086470225357, -0.25943055088222544], [-0.69982881589022727, 0.73244507843885831, 0.50530996105515524], [0.14056247509276298, -0.37737154900750891, -0.80720130107919141], [-0.26443615738587889, 0.86677683791888693, -0.37842068809223717]], [[-0.35332176257905901, -0.05131536020356342, 0.48459593533962475], [0.14787919562401841, -0.05877916313632503, 0.80763132577076435], [0.82838146823453607, -0.46328912456023508, -0.092534901405812997], [0.89498369602102512, 0.11677513818870389, 0.47190536716640286], [-0.47720759180588979, 0.99385389896396492, -0.50436114629684781], [-0.73304964564288744, 0.72455607703410529, 0.67839516726541893]], [[-0.042585807486037908, 0.33165529897599066, 0.45769753486337228], [-0.98524859626214734, 0.065469188331662709, 0.034205836408484958], [-0.7302925773969009, 0.73143308763092874, -0.21807398062448513], [0.73853460465309295, -0.0046677842081679355, -0.65411464050888224], [-0.3701991077317468, -0.060943959203267228, -0.26098034241509827], [-0.36047706346119823, 0.61751648380068414, -0.46341305673987687]]])
1619            ref=transpose(xx,1)
1620            res=Evaluator(y)(x=xx)
1621            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1622        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1623        def test_transpose_Symbol_rank3_offset2(self):
1624            shape=(1, 4, 5)
1625            x=Symbol('x', shape)
1626            y=transpose(x,2)
1627            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1628            xx=numpy.array([[[-0.11138292949003414, -0.9966219758762469, -0.75238200850397852, 0.012016326261288457, -0.38588046052873026], [0.054101063247043113, 0.71210065405392275, 0.20709961033750024, 0.73383699012440817, 0.85407429009540481], [0.17731026552124485, -0.80998430602427862, 0.60869746211919651, 0.363228948335099, 0.40384653824566152], [-0.88481911834783777, -0.042994677789591762, -0.12814472104819208, -0.13728556326062713, -0.72079607335026052]]])
1629            ref=transpose(xx,2)
1630            res=Evaluator(y)(x=xx)
1631            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1632        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1633        def test_transpose_Symbol_rank3_offset3(self):
1634            shape=(4, 3, 6)
1635            x=Symbol('x', shape)
1636            y=transpose(x,3)
1637            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1638            xx=numpy.array([[[-0.81150416559984895, 0.87825846253192408, -0.040020147528051497, 0.84209651706594468, -0.27162192431233767, -0.38168580447044231], [-0.61693126932666487, 0.50948383294622634, 0.91789222879033638, 0.8760696455206054, -0.8853356447460099, 0.65819077182524621], [0.14963441044398529, -0.64523200366881484, 0.61313468669699178, 0.51109308884597104, -0.48349254638542982, -0.42487949254346913]], [[-0.68673318206386291, -0.088957690368124176, 0.11049443079217158, -0.57572729094269781, -0.82998643436861852, 0.54091235012407957], [-0.32506196710658175, -0.51563786307266235, 0.48045176035619996, 0.1414304216357849, -0.049831142807863937, -0.60733847152749498], [0.91618519354208283, -0.3422097005082767, -0.82659561777366353, -0.24206709349115285, -0.34971253639249245, 0.75504455376065072]], [[0.91982833309149692, 0.62708719853490358, -0.077143954398477321, 0.19256296585745281, -0.97672412722813706, -0.91096837254744378], [-0.2380317254987272, 0.29551143700494853, 0.62061035064087489, 0.96335957364541924, 0.1464984318460214, 0.49360702989445815], [-0.99339001488487111, -0.63315316722206139, 0.40294338291604603, 0.90459826769939977, 0.31623731174997483, -0.37228371666092075]], [[0.83094847610604194, 0.49402223358032327, -0.68615722541011159, -0.70600173119068432, 0.08369756127118011, -0.55243304698664497], [0.14983573267202188, 0.4587839145231718, 0.31792049605198525, 0.27521620922078105, 0.089323068013183127, -0.80775514668170101], [0.16102581666628102, 0.19086215533842865, -0.59302624030477569, 0.96558651796050521, -0.94669845383882278, 0.13560362071487919]]])
1639            ref=transpose(xx,3)
1640            res=Evaluator(y)(x=xx)
1641            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1642        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1643        def test_transpose_Symbol_rank4_offset0(self):
1644            shape=(4, 2, 1, 1)
1645            x=Symbol('x', shape)
1646            y=transpose(x,0)
1647            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1648            xx=numpy.array([[[[0.82315784319776375]], [[-0.31408535813617]]], [[[0.39154058327222718]], [[0.44340903830768141]]], [[[0.94608999914643088]], [[0.68438829417996372]]], [[[0.79041872119178258]], [[-0.24969098882172536]]]])
1649            ref=transpose(xx,0)
1650            res=Evaluator(y)(x=xx)
1651            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1652        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1653        def test_transpose_Symbol_rank4_offset1(self):
1654            shape=(5, 4, 4, 6)
1655            x=Symbol('x', shape)
1656            y=transpose(x,1)
1657            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1658            xx=numpy.array([[[[0.72424452273898843, 0.44391390419374122, 0.35028960945238929, -0.56981267648707457, 0.67028481084125691, -0.079026742148440077], [-0.77118904260956445, -0.16119481499755417, 0.45845915191074349, -0.63646190650177914, -0.011358565470579007, -0.013563308304514354], [-0.92668577146362807, -0.3109775532958079, -0.3360524090494954, 0.15549356165562789, -0.80536343828959178, 0.15113275050454011], [-0.8545001434533166, -0.42848726822907857, -0.27950582197465779, -0.77752152992173551, -0.35084256024470273, -0.97465512758195638]], [[0.19929772173425064, -0.53943487461165196, -0.28432143465089155, -0.8894698482363701, -0.49855430129273692, 0.047369042207501044], [0.87796631589497487, 0.64773903915635156, 0.35696802246925707, -0.58646313886833412, -0.28114015146694249, 0.76837814359760959], [0.78932550913955013, 0.32287510176287948, -0.92126727757784677, 0.33317536398874714, -0.93715151400819852, 0.30905684957932689], [-0.96479943818917113, 0.14254496783429671, -0.25856464805810542, -0.74551783721430409, 0.057528975355305878, -0.54942333781089769]], [[0.72875926118908252, 0.55077400284431666, -0.5824343867284465, -0.71042189360674879, 0.83050157127514868, -0.23709957168626228], [0.75847271776983716, 0.53669516302022902, -0.25092602244044904, -0.84888199792852159, 0.46997252231657161, 0.61687699950288399], [0.62962994959363128, 0.75886136996122144, -0.74761017694883725, 0.87480584507831094, 0.56367787538930925, 0.5018899253738347], [0.52307792238254325, 0.70056387859810743, -0.85644982352933785, 0.70323641826204142, -0.91643357127492986, 0.9246099459248418]], [[0.036629919151081936, 0.43872192426754153, 0.82567999155556748, 0.98546987458021373, 0.12696204638891939, -0.80297393272789042], [0.9975473820640457, 0.73888517343193838, 0.3915750243423175, -0.3276328299097413, 0.89794724652867908, -0.080036006592007158], [0.17441437006696248, -0.067500414987598845, 0.83254356350717362, 0.66353952895985113, -0.32935259430288832, 0.38477789818624086], [0.39211155839150003, -0.32097429271062827, 0.78236012951024736, -0.25518391777551064, -0.81509522768390297, 0.4680146335067954]]], [[[0.12707064457233264, 0.070877316164788873, 0.99073807466005137, -0.66779162433771, -0.27322724952979471, -0.30717783974417512], [0.66004699847523884, 0.74265029817023542, 0.74615269664598594, -0.776640847842613, -0.15761289194205275, 0.83943576999065139], [-0.17471953744258517, -0.59070141553657685, -0.19307375224614787, 0.75556002165991476, -0.28758852661217804, -0.63872546746564995], [-0.21480568218825558, -0.93820401491702343, 0.77546365627373626, 0.68316340945678666, 0.32452849267271788, -0.85688578778114022]], [[-0.014149230163182924, 0.50956646515634874, 0.65568903957525704, -0.51906517082043235, -0.23980972099966857, -0.156685483776416], [-0.46471664341776808, -0.094765108161497524, -0.10006318841749473, 0.54171026966871327, 0.93092627590606902, -0.26694086307452269], [-0.87539121464803649, -0.15455762561678088, 0.0093256642808083878, -0.044835376513790326, -0.58713497854522245, -0.48184354585845512], [0.20191210598738052, 0.32849235859297621, 0.63697359954487554, 0.026066311848150558, -0.79169491789996926, 0.12024476441329535]], [[0.47234814197865971, 0.3132156246022586, -0.1273645216150352, 0.52723918718920837, 0.98999738397501558, 0.92703657049527277], [0.78524633680080402, -0.98742344810063321, -0.89485657822973508, -0.80492102641699126, 0.65494098211081697, -0.27866445539832663], [0.68956675480796825, -0.45469992567639195, -0.077259949640841485, 0.53538588499448125, -0.035603477340164336, -0.12573012778987946], [0.54601802461593185, -0.98816131220672343, -0.22599994143747248, -0.44219249678526151, -0.50344745275107594, 0.0031312410399992885]], [[-0.62551581367670472, -0.73024921725437997, -0.08386316319901832, -0.36309874680929677, 0.49067641958296426, -0.62011239951401054], [0.84275093682724278, -0.26771838779259616, -0.15298545590914681, 0.54874982593329769, -0.078088765501685087, 0.56058098162204262], [0.78977641499825957, 0.044329456446434934, 0.054529475157984786, -0.86690334749228692, 0.41779882596789641, 0.9676704157377507], [-0.74653365288068985, 0.17173224260646469, 0.35871610296198098, 0.21685196666057771, -0.73659383530484379, -0.13940908084605752]]], [[[-0.0039714305233160552, -0.16026111597046211, -0.37342036227548236, 0.65753380950639362, -0.19764551812665831, -0.59857428496210385], [0.4029660306163183, 0.84014391145308953, 0.21785889265308067, 0.97322218994022736, 0.23353989207941694, 0.67260452580306307], [-0.2097697371789633, -0.062501385453538338, -0.19689334718328344, -0.11681871516214226, 0.57393853437081455, -0.30331080594794768], [0.34119038093605747, -0.96548210893083231, -0.74608076483679731, 0.2629127354158971, 0.079263203097905244, -0.41915767783566071]], [[-0.8620719582970251, -0.10787934098732532, -0.0055136433726685752, 0.70303274337878907, 0.9896337138389264, 0.25553264343815552], [0.001584698655621164, -0.68123393760377038, 0.6486260613410233, -0.11109578495919159, 0.54948946123880882, 0.58291969423460488], [-0.29996033882252715, 0.42044712319807043, 0.18657543968076773, -0.88281168626708895, -0.029776072115871077, -0.31283940468280536], [-0.12410013101882522, -0.14998612231335251, 0.65421892464454867, 0.5315132107213274, 0.67733853882624429, 0.46324401253969416]], [[-0.89136724755029229, 0.075473113324051155, 0.98366862622568085, -0.066714586221633176, -0.20760649082542249, 0.54840522852305273], [-0.25582210645406267, 0.56282350782428003, -0.59031960895277402, 0.66672889875991426, -0.31362491470982978, -0.78459965973949441], [-0.42216142268957424, -0.83573738861147628, -0.057287373413045017, 0.18171341448258205, -0.9606009995792224, -0.30158319485202223], [0.0014221060933632401, -0.5031824472302755, 0.42074211901507197, -0.14671748897432302, -0.91547570772869324, 0.88505315475850566]], [[-0.66101451042409898, -0.41307559479472977, 0.031718519637306652, -0.1740072552516847, -0.93522784698291428, -0.79315196597362858], [0.90396029508815801, -0.73667707653774683, 0.94043681724393968, 0.87422495819732471, -0.034690362461643476, -0.91679881270843477], [0.87660962481009563, -0.88108978772851754, 0.25925441948026262, 0.62609537294458439, -0.033704667132616883, 0.62889227148521387], [0.80253615544507118, -0.58300290281277856, -0.25481297332654762, -0.77460387490954008, -0.99274658374125346, -0.93873201702912179]]], [[[0.33933718261260593, -0.36275612508137178, -0.84770009507358068, -0.67147839670025955, 0.92518120498568068, -0.90616412167409965], [0.97648806424134382, 0.23663072858705858, -0.080039844884343792, 0.082623984311969378, -0.0064853597115765993, -0.76889206822336198], [0.57076494711359049, -0.56655284817814988, -0.51654828814111386, 0.66919205307340501, 0.69695740645327886, -0.95898820023215614], [0.25630103744773902, 0.049256495470772377, 0.79732486370511624, 0.85080714082936804, -0.85328201662987668, 0.54689469366468346]], [[0.94816199194325734, -0.90776321870852716, 0.1376365331714271, -0.51432827196211717, 0.72638815302848436, -0.95478078438360203], [-0.59368754430631432, 0.033759150072538935, 0.48212880475957576, -0.74324929315912547, 0.20411373561259838, -0.30263665051866506], [0.85764019077792586, 0.30660213836749661, -0.32239648788237685, 0.45646048363415859, 0.61646400415878166, 0.88043092311930704], [0.85852806607460419, 0.41558944959772881, -0.74758771082845876, -0.0024937442704469071, 0.87116902676145402, 0.71683555476730021]], [[-0.081971106398546212, 0.035933716878532085, 0.12903272871772864, 0.80442872066041704, -0.93276859025476599, 0.077272737216844689], [0.86480582065300982, 0.5695880657177772, 0.14200316917476608, 0.27060649350636301, 0.65897237124961516, -0.039329962006085628], [-0.57059187233047526, -0.35843655283105691, -0.36909077523121803, 0.28557492277146879, -0.059972774775238769, 0.025462582930021238], [-0.99923178947369329, 0.36491002807567274, 0.92750999084135377, -0.59746782459070724, -0.43134536704115778, -0.73690232467510097]], [[0.03682944989024528, 0.78350499229479564, -0.51634598650075758, 0.18446899252763926, 0.13073115062492024, -0.45172611267405927], [-0.27246132009361745, -0.97193419110361789, -0.31243045318004214, -0.85089015073978658, 0.91870121045615583, -0.77181018605701657], [-0.55439630578865073, 0.5144826388992596, 0.6786208768756965, -0.68765810419471607, 0.26138854782723087, -0.77234305396007841], [0.17714287917396354, 0.78107914894563657, 0.10470140744993572, 0.44119299998885642, 0.011203058473587824, -0.46096764062905549]]], [[[0.21108622766968055, 0.30480013168978837, -0.61895006183631884, -0.91469526460667283, -0.038234081834005229, 0.77409763585333868], [0.89023480473953054, 0.1189667585319758, 0.32054624061187487, -0.75122575788649559, -0.49686642561235494, -0.72795508499142803], [0.74725179377974071, -0.43604774531068746, -0.90003824933445942, 0.50279885129769486, 0.57126892800732709, 0.38333597228666272], [-0.17843694606440663, -0.58261000189398082, 0.046327439751923549, -0.87108464636429828, 0.45277337902679093, 0.041632849725611987]], [[-0.50154242817771433, -0.44383599694129972, -0.093842083912457408, -0.58066435768225078, -0.99313307032759712, 0.35083752049895867], [0.5807691719249275, 0.90463539133773829, -0.38058606442086029, 0.71214110646860473, 0.71692227152521881, -0.41559418617472454], [-0.80522130262175318, 0.44637614963951311, 0.6080068196465509, -0.9203007203854483, 0.17739925021120873, 0.018967627755532623], [0.66228611450869224, 0.1715094136816897, 0.0027994837491627234, 0.50202338845253047, -0.6982201512758337, 0.78386763697243489]], [[0.31101514902861416, -0.65977665978251809, -0.81439675731270222, -0.26632299103032686, -0.94775704743759381, 0.88580893577329545], [-0.74841378688069526, 0.76410877846439695, 0.16261272364791246, 0.085007008733067879, -0.35025825777177477, -0.21933629401855703], [-0.091589541608356972, 0.39107340860582052, 0.061236070830427813, -0.86667270504668159, -0.20418823457104063, -0.57890711269266815], [0.12420370399811564, 0.04871829872115585, -0.84476402288817631, 0.066785824671447225, -0.74285246654502357, 0.5896335956176586]], [[-0.013118884314642809, 0.072792776177045493, -0.27351200061697134, 0.25262394757285356, 0.64308989818210938, 0.88844633476321766], [0.90253462074457724, 0.94076765861648193, -0.57831261386284005, 0.55969701784872461, 0.35559405465229998, 0.56179009193634322], [-0.65807463585566306, -0.70006381377269689, -0.2156524553182495, -0.58517171287627123, 0.0050506354138797338, -0.46013621105638025], [-0.068604045524115032, -0.84546705460158478, -0.038946943735732376, 0.97974129546374811, -0.47275782765803931, 0.36815682796229643]]]])
1659            ref=transpose(xx,1)
1660            res=Evaluator(y)(x=xx)
1661            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1662        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1663        def test_transpose_Symbol_rank4_offset2(self):
1664            shape=(2, 1, 4, 1)
1665            x=Symbol('x', shape)
1666            y=transpose(x,2)
1667            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1668            xx=numpy.array([[[[0.11478578667798778], [-0.65686936873613444], [-0.65657042291056422], [-0.38700410130864027]]], [[[-0.83315225395662695], [-0.52622965283269441], [0.54531724467707487], [0.085057700555789539]]]])
1669            ref=transpose(xx,2)
1670            res=Evaluator(y)(x=xx)
1671            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1672        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1673        def test_transpose_Symbol_rank4_offset3(self):
1674            shape=(6, 1, 1, 6)
1675            x=Symbol('x', shape)
1676            y=transpose(x,3)
1677            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1678            xx=numpy.array([[[[0.031079229055516633, 0.90100936451706515, 0.95100643641040161, -0.02355102092868, -0.67099424752533743, -0.30038575820344326]]], [[[0.28749064167525029, -0.26801169818044213, 0.99416058102606986, -0.54451693408359914, -0.22553918123720407, 0.76547496667275672]]], [[[0.35412475743814253, 0.23121440504332424, 0.18485775510715108, 0.073531749295211224, 0.22521718194232765, -0.39625675316765174]]], [[[-0.67650209677024642, -0.34039565011388784, 0.63744711938772558, -0.95144009169284893, 0.42603251665603059, -0.22916626649247251]]], [[[0.15569333726283863, 0.69370290129073808, 0.1538636564175877, 0.77459706908051995, 0.73489893302107334, 0.050512574220310302]]], [[[0.85600200935433013, -0.11678475230963747, -0.47384958630152774, -0.25914754746911917, -0.98178354141034196, -0.49730577478252358]]]])
1679            ref=transpose(xx,3)
1680            res=Evaluator(y)(x=xx)
1681            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1682        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1683        def test_transpose_Symbol_rank4_offset4(self):
1684            shape=(2, 6, 6, 5)
1685            x=Symbol('x', shape)
1686            y=transpose(x,4)
1687            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1688            xx=numpy.array([[[[-0.24188450177776244, -0.020185522256929378, -0.30016031650202968, 0.32837268993505231, -0.08624878422856086], [-0.15307808974033676, -0.76412536974131662, 0.38299295143136014, -0.20407862007823052, -0.1290553532992702], [0.75716016991604085, -0.32013277291766906, 0.038184899250111926, 0.78791424035221125, 0.79143313504661639], [0.31258771342764446, 0.41133720736681001, -0.17012957636615567, 0.55681365935270444, 0.81320867959175147], [-0.19440983094497888, 0.26645929974416283, -0.97654800267102737, -0.51681467942254256, 0.12121986859607836], [-0.23045308915076856, 0.54055456629771581, 0.58787211991198229, 0.68571233886249572, 0.79859183202723982]], [[-0.85560283553775363, -0.22587910645544862, 0.48787643715982343, 0.26026819782485, -0.092775265201596957], [-0.051797383003088004, 0.3341066584631649, -0.38282495207806577, -0.34661228119146759, -0.75012178116886474], [-0.051761428961159428, 0.57413999840272179, 0.89610258768611173, -0.95985885102613611, -0.016829081897892673], [-0.87684312318785196, 0.31035754180119346, 0.78509308384754228, -0.55032637879219148, -0.20662814729995427], [0.40842717907766546, -0.94052523366407481, -0.73977164614894897, -0.6526620194497208, -0.45512312466430993], [0.54784573801684466, 0.67678072386795218, 0.30765620942875471, 0.050275062991830488, 0.15797543205170839]], [[-0.24794361612521776, 0.65749721541983663, 0.96795724300038821, -0.10561666434330319, -0.52924733353364473], [0.82929709453214651, 0.84436366983167233, -0.14416462186968193, 0.49414914387327591, 0.50636092359160156], [0.99378883610309887, -0.66152632976570502, 0.83226446163446988, 0.65343324178223217, 0.4864391353368398], [-0.39779647271545415, -0.19490488264065853, -0.24707764041799951, -0.60933897339368537, 0.35859876067544683], [0.10794652655235093, 0.45434488175440491, -0.35329103219684366, -0.046797665508206743, -0.78266209882792093], [0.69823712094542345, 0.84479222409530585, -0.9587386357676948, -0.16853013828725905, 0.99592307428079474]], [[-0.72664525222205167, 0.37556000173489568, -0.71882371176672133, 0.3580597017621312, 0.038656224121606853], [-0.12704882572552978, 0.12198450986202825, 0.53388585732438099, 0.24174199935766594, -0.49335302971847228], [0.98890568393048395, -0.3132237349045186, -0.98618115343395951, -0.59543379772644589, 0.6921918413949415], [0.90136580398848287, -0.74907900763456858, -0.94264708490541316, -0.45327593900512242, 0.84214027550186987], [-0.92197591601632833, -0.58522403078777185, -0.92924469265424325, -0.17276128453693573, 0.64976919087345664], [0.14570729980168617, 0.75579029703596334, -0.33547311512690947, 0.78350366197206522, 0.48935768103757127]], [[-0.88268121695630475, -0.036887253415718746, 0.1275741922278486, -0.78857638724865042, -0.3288477563835992], [0.17596345296235127, -0.46768368242654024, -0.84400314296378531, 0.69326959413703815, 0.16262355450938171], [0.30330817929907394, -0.50909899923072088, -0.44568436845843729, 0.033575152676255549, 0.081040238589082936], [0.25548987300008208, 0.42296992412763412, 0.59723225987526307, -0.34638425220735858, 0.13814830825816715], [-0.97270623361507313, 0.30261426268067604, 0.018988683780432947, -0.88963204151557718, 0.13988345499517951], [0.25316789897995839, -0.87151098446072117, -0.31791958536944298, 0.080705367991605437, -0.74969987409171757]], [[-0.11403050234970968, 0.65837830370966977, 0.99736120495715097, -0.26285009052262409, 0.21797113130264778], [-0.68748008688707496, 0.70155423389876237, -0.58050002795057565, -0.0013404057733037433, -0.53828510447392408], [0.69632176012375191, 0.15219540391310415, 0.47619649009863996, 0.77535014245476708, -0.32938958605230106], [0.10700315702844154, 0.44364249120430821, -0.77991005450985118, 0.48500952268291719, -0.37336856488757308], [0.56205028169120719, -0.85469183712520702, -0.43443708283047622, 0.98163962824575668, -0.94300275327347149], [-0.26392284799183874, -0.45745653037562861, 0.34628131948303298, -0.74374349070572965, -0.34946186742375107]]], [[[0.9571195901835019, -0.91026045829494273, -0.67083301791997996, 0.98497041375780992, -0.63297482984894371], [0.97303862317799084, -0.35039486631452021, -0.032846232041207291, 0.16159740048415849, 0.6727090857257505], [0.51171070184166556, -0.63190922649943593, -0.31742180881444182, 0.55871402608368848, -0.8014484503710273], [0.38290638330091431, -0.18243287459797952, -0.23151588464578055, 0.77323319822474001, -0.61245980851983206], [0.76225826792629592, 0.86481207731320642, -0.67183003872231906, -0.69203540886825321, 0.22917819364175429], [-0.87557903243077084, 0.94897068960751296, -0.19163855679151331, -0.69420579771429014, -0.20276746215742936]], [[-0.39504603044667896, -0.49059423497612831, -0.56830715712076429, 0.03901497410951893, -0.34734328536122971], [0.96998130271928695, -0.41557087673653914, 0.6856169241893213, 0.71352681679253904, -0.27025338280713562], [0.0073739226635316513, -0.7802832487717668, -0.22497564440402829, 0.1882744310325386, -0.38076989449605247], [0.3127012924331587, 0.92402907870229578, -0.94632801705502612, -0.32177340473246097, 0.87250726629943243], [0.0064359012513139913, -0.37950075218384804, -0.1429303403818396, 0.47723359607263194, 0.73385095777664899], [0.75766833448175785, 0.55905481854114614, 0.74984355781886824, -0.10749943328693745, 0.45204757051416022]], [[0.94459021106867613, -0.40340751896148563, -0.78293876255265116, -0.73654984831806969, -0.57741056745099595], [-0.61622921775255102, -0.20076144087754466, -0.3368666748453355, -0.67321037709039699, 0.063834870949827316], [-0.43176840705492658, 0.75780901485787622, -0.87364903594643106, 0.15214953668907083, -0.23014856054740185], [-0.64854683604775798, -0.60058782538030342, 0.95168120522867694, -0.2014455561075974, 0.18857294715539763], [0.63876799127243955, 0.31969974712331939, 0.54691197536497271, 0.42717913441990141, -0.88577844765349933], [-0.29947126123025081, -0.12602505803396502, 0.98342271633452549, 0.79188335229865747, 0.41712959085990398]], [[0.22122554779798698, 0.90609440339739744, 0.81525094870423875, 0.46470777695031518, 0.012472589983900884], [-0.95289510787271037, 0.29232844297927474, 0.39905051037132555, 0.18518666710327913, 0.77733105970240612], [-0.27182344993666274, -0.64443409443231991, -0.98754937400031495, -0.069399132924954365, 0.19736244907334566], [-0.8964090846882955, -0.74948319355773263, 0.11837968938895527, 0.89456797673348398, 0.1680086366421385], [0.22242609048867323, 0.9064874559981646, 0.95278454984795702, -0.94906470262902842, 0.017272591660281167], [-0.60812214296041889, -0.58593174102804069, 0.35786419009408243, 0.23854111377274489, 0.54367253938600202]], [[-0.083347232137542804, -0.17735390510081173, 0.11813730815583456, -0.59877455579046734, -0.41355386284102358], [0.77926746064643981, -0.077112860068911271, -0.92028817328518353, -0.50871776720220052, -0.74222526156684565], [-0.1823923043702218, 0.86042368734385177, 0.017222419436303982, 0.4962830067635553, 0.22937651890662858], [0.62967128553800644, -0.077564843343165268, 0.066130118941811089, 0.1793735395473568, -0.0053387294906399596], [0.94638047171993667, 0.94763344212029432, 0.0085356067276047831, -0.12529571726208011, -0.71447375894237908], [-0.8619085220520688, -0.7425377672663489, -0.15940228126185096, -0.11626378641074675, 0.58390272110630836]], [[0.28430842258309452, 0.36269762605901157, -0.55159361924508388, -0.31627811031803832, -0.20990720054000067], [0.33907794349651987, 0.72863602526211357, -0.19986270567849473, 0.91828753234883664, 0.12569750704901206], [0.96682812841065147, -0.023035746522797051, 0.055569444429119486, 0.070180329974148137, -0.46738769212997955], [-0.34266849973958435, 0.23740143441357242, -0.52934731202216745, 0.51234169411795061, 0.20703374100901462], [-0.32174846220152387, -0.98037999146599364, 0.2814513145413573, 0.43511615428800265, 0.10948216551610845], [-0.70891848510245548, -0.90130608667326029, 0.80422057186471085, -0.64416031390690676, 0.52476024053073211]]]])
1689            ref=transpose(xx,4)
1690            res=Evaluator(y)(x=xx)
1691            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1692
1693        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1694        def test_trace_Symbol_rank2_offset0(self):
1695            shape=(3, 3)
1696            x=Symbol('x', shape)
1697            y=trace(x,0)
1698            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1699            xx=numpy.array([[0.32756559784778516, 0.74310752279453718, 0.81532996596372298], [-0.60198320456400611, -0.76270603777797019, 0.19314840124534216], [-0.072327449483367001, -0.43056286340090022, -0.27508208333258155]])
1700            ref=trace(xx,0)
1701            res=Evaluator(y)(x=xx)
1702            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1703        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1704        def test_trace_Symbol_rank3_offset0(self):
1705            shape=(5, 5, 4)
1706            x=Symbol('x', shape)
1707            y=trace(x,0)
1708            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1709            xx=numpy.array([[[0.030922703383644778, -0.3443233612426897, -0.75455361767435258, 0.87982911224093496], [0.64581941692214451, 0.43012340750918643, 0.84888986297232538, 0.18299590423790568], [0.28586872910043493, 0.3070405511364267, -0.0061073390949517581, -0.95267181038333137], [-0.64558766647819477, -0.93380762557558294, 0.22899145189439296, 0.88646493372891277], [0.35048995604804367, 0.48425806837556595, 0.70986982485325867, -0.0063517855045662763]], [[0.1663552983985197, -0.80320180751371684, -0.44232084555448714, 0.86980162766007618], [-0.71360516027659093, 0.013196020309956147, 0.48871981688421218, -0.39225072711506992], [0.18283389252161819, 0.040869721962815353, 0.45450598031290146, -0.18816515784454069], [-0.45032904725185774, -0.31303166002995941, 0.20614960481953837, -0.35044166107647157], [0.55452663525861712, 0.17991416537679528, -0.39108595210792774, -0.25877895399204132]], [[0.066824050124954404, -0.095359233529428877, -0.83137614264574689, 0.90699984565169611], [-0.073058052370406967, 0.16237158368935867, 0.68839151579209412, -0.11859557184437519], [-0.79009920222209851, 0.12181017550653839, 0.94715399036036718, -0.24167456434054158], [-0.31571276125700765, 0.59727598982846741, -0.66734236798065005, 0.1684254476668352], [0.92258329188512955, 0.5141147300751352, -0.28691491903646971, -0.67648496372715794]], [[-0.8968293895112589, 0.58320958556792202, -0.96513230258513216, -0.63036098252560291], [-0.76126983724165331, -0.95716400001295177, 0.77230961022095101, -0.51964019537536266], [-0.33832584922131259, 0.28809255098490172, -0.96145066439380966, 0.074513493325629288], [0.44367568874122476, -0.30435534034924627, -0.83894217203593757, 0.79250618479239265], [-0.26993144408525627, -0.3751890602449941, 0.51492507734304627, -0.93685806002281513]], [[-0.001577644490730945, 0.99749094625379908, -0.60838988442759212, 0.091052160305566732], [0.58097411210294592, -0.31418019538081432, -0.3940247114900588, 0.67908643748788533], [-0.42379190700235059, -0.27488344660484976, -0.43823710611394984, 0.8922143647212637], [-0.71959252502299109, 0.98466398123991805, -0.010960386612254069, -0.079764069970991169], [-0.40788732458681332, 0.29714293105800471, -0.037972038299979305, 0.56164151089507941]]])
1710            ref=trace(xx,0)
1711            res=Evaluator(y)(x=xx)
1712            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1713        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1714        def test_trace_Symbol_rank3_offset1(self):
1715            shape=(2, 3, 3)
1716            x=Symbol('x', shape)
1717            y=trace(x,1)
1718            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1719            xx=numpy.array([[[-0.25197693123253018, -0.77435612069993587, -0.20760741398733873], [-0.010420803780166077, 0.5615769141137037, 0.17474474357853786], [-0.67155771660488695, -0.94266684798225464, 0.085772654945666327]], [[0.021642310416709165, 0.58881637291325561, -0.8058693419201568], [-0.12935792438776605, 0.048900379028203211, 0.36849928613416161], [-0.66562754383369538, -0.0024003744851901487, -0.93335621744210351]]])
1720            ref=trace(xx,1)
1721            res=Evaluator(y)(x=xx)
1722            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1723        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1724        def test_trace_Symbol_rank4_offset0(self):
1725            shape=(3, 3, 5, 3)
1726            x=Symbol('x', shape)
1727            y=trace(x,0)
1728            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1729            xx=numpy.array([[[[-0.83906997534199435, -0.065224470164882087, -0.60003584973711388], [-0.096583638736701616, 0.72299219659499525, -0.88172583208008182], [-0.025755168226349046, 0.77866379184253232, -0.58530749717486286], [0.93494152654989549, 0.70593832753144525, 0.55269690113331649], [0.65066974294275082, 0.74137970402126552, -0.61707462814369651]], [[-0.016143454382967493, 0.79328222507217472, 0.55336043356958253], [0.69974144070762234, -0.041858590623100822, -0.94072147137866935], [0.035951372592101016, 0.69692911810720615, 0.6150258261182866], [0.056434515714816502, 0.61030605113509528, 0.074459383195740525], [-0.75036145156707756, 0.43402293175972906, -0.31187773305057509]], [[-0.024839914610529812, -0.68596422922759182, -0.3169314435894226], [-0.63766580625587821, 0.85862495396122829, -0.13884264268107049], [-0.42777438922006406, -0.0048238426285125424, -0.99713646965866332], [0.71498437726532238, -0.32446795804663453, 0.53791348728846722], [-0.57141522927720101, 0.70690380314061452, 0.30536168065470237]]], [[[-0.86513003434046754, 0.66913513617958009, -0.72352725992045275], [0.7839916006731289, -0.67297272544967135, -0.17699554495437164], [0.54306830803292461, 0.34379180691401512, -0.72199511720450493], [0.048182463124081032, -0.12820083809663863, 0.078006295574482465], [0.0096755410734967739, -0.33414622234488034, -0.17809610883407889]], [[0.47064000207484002, -0.81704090599245727, 0.17648686611286202], [0.5277751410068563, -0.73618390860715022, 0.18818223236985077], [-0.92810015821222747, -0.37089075014483419, 0.091641928389350147], [0.28037401581033272, -0.19199496594746313, 0.35441778146221381], [-0.66107160686531508, -0.42477829445043391, -0.12569292675607646]], [[-0.1093266742435266, -0.34150173207854917, 0.85629423229798673], [-0.90882829262568099, 0.19856676927901451, -0.20172487663330796], [0.086473617365266486, -0.64762916517421698, -0.84213204918167683], [0.8240362047899894, 0.6623700758704465, 0.88788034182450226], [-0.27264542667370772, 0.68576346491384332, -0.26394093572133071]]], [[[-0.92748824368653082, -0.64913767787566523, -0.50891370519027546], [-0.98124808089928073, -0.56070692463190674, -0.66050516990428121], [0.68350685291420432, 0.78620290146787086, 0.90115239831569793], [0.099368765731119524, 0.083028955443718244, 0.7632118862790036], [0.88820131476063224, -0.70395939865970503, -0.13142907363012513]], [[-0.59822761453862272, 0.82705007328897895, 0.71322896635706612], [-0.43192461772269697, 0.03718068844525857, 0.10567290633986381], [0.85332195701730074, -0.8593678231279025, 0.94715519619048805], [0.41910030390690056, -0.93436909912356603, -0.70196746000270616], [0.99454679470750862, 0.66879325469125828, 0.22622080126213517]], [[0.33287399900809422, -0.82666851200520641, -0.62584733610552545], [-0.57403952454308738, 0.8627786590088955, -0.49659999718428405], [0.12699273446626247, 0.41476438055613829, -0.2286142323798066], [0.80873813351915924, 0.67071051208320709, -0.50086849923436061], [-0.42101451137979429, -0.72646146200042749, -0.042679945773102856]]]])
1730            ref=trace(xx,0)
1731            res=Evaluator(y)(x=xx)
1732            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1733        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1734        def test_trace_Symbol_rank4_offset1(self):
1735            shape=(2, 3, 3, 6)
1736            x=Symbol('x', shape)
1737            y=trace(x,1)
1738            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1739            xx=numpy.array([[[[0.31945285041564397, 0.51965936311175454, 0.45045344252892239, -0.42539673723252136, -0.71050530100775133, 0.60194891873933654], [0.31692533586401139, -0.096395626693496661, 0.73793750285735005, -0.65291505915451564, 0.78561841433764701, -0.45517007029282897], [0.43581974810210156, 0.15193088821969725, -0.77183994291232283, 0.72898456886853036, -0.42602440408160613, -0.70661918576622607]], [[-0.24159142917326881, -0.27856148587204332, 0.14706899849808752, -0.94403130288578185, 0.38820480340554142, -0.98978310105325562], [0.72104978780480056, -0.57147950155115113, -0.42622116343501748, -0.21483587976506135, 0.75897113406701289, -0.28358393489654121], [0.85412365119613165, -0.72418623814849359, 0.49115552796836859, -0.23987516941030518, 0.10785143953352727, 0.19397457898627657]], [[0.95859660010912329, 0.15118078332154861, 0.73268717103858094, -0.30030431905216637, -0.70059290480335323, 0.46805253385054124], [0.55816947959781116, -0.10758837287786593, 0.66618604919616309, 0.47945722415075509, -0.95062835523236999, -0.67715245301458293], [0.44097455178515754, 0.35536713203308268, -0.66456204699742627, -0.77323681832243873, 0.6449655757061552, -0.86231160799818296]]], [[[0.040324649415151015, 0.66753827895853579, -0.72346677941233128, -0.97958765162891481, 0.30052560970615438, -0.49505759676094918], [-0.14781409811988588, -0.27220165196209711, -0.1945476395232324, -0.080533441018540097, 0.84603587502403022, -0.43085895791812057], [0.12888693943344309, 0.088643719051592074, -0.58116665669417245, 0.76441599833529561, 0.15980194058848007, 0.10974199013792529]], [[-0.28149621137644898, -0.59224615523307778, 0.10423963572924699, 0.1952946800608395, 0.617764303820445, -0.36197469447716646], [0.10157462466301803, -0.89194765234667361, -0.19009152454274347, -0.042612602864625204, -0.92546571596072202, -0.017751743158792799], [0.48932299403771129, -0.51606065749341168, -0.074124412479717794, -0.21292461574087396, 0.23358594568569657, 0.42297031809745911]], [[-0.31571903560591097, -0.6671208549195109, -0.26596025284732594, -0.46113489220922266, 0.021583736492196914, 0.62482913875574342], [0.92816061925365179, 0.69846015228554914, 0.81185730623103769, 0.41641459337983799, 0.47794304082284911, 0.9798640481883234], [0.69406680101909468, 0.28099669100284697, -0.36058351134604427, -0.41199943737180011, 0.95940899293337001, 0.90750591138561787]]]])
1740            ref=trace(xx,1)
1741            res=Evaluator(y)(x=xx)
1742            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1743        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1744        def test_trace_Symbol_rank4_offset2(self):
1745            shape=(6, 4, 3, 3)
1746            x=Symbol('x', shape)
1747            y=trace(x,2)
1748            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1749            xx=numpy.array([[[[0.98305042412138222, -0.036842472139186677, 0.21411792905051352], [0.9824717084600707, 0.59544665816766695, 0.7945931106856956], [0.21010792600843065, -0.81402161206024148, -0.041643971890634512]], [[-0.52907948071455024, 0.61917747825492353, -0.78985507828665247], [-0.84520092507773503, 0.43203861773057017, -0.57640569827024857], [-0.78450747434942114, -0.33854074908313359, -0.94557304740184578]], [[0.87109524304689234, 0.93693942710578448, 0.12099229973474102], [-0.59803156848379668, 0.37841991932647279, -0.61587974701799997], [0.15940458583749528, 0.62561460899821908, -0.055233472094635472]], [[0.029386484228094201, -0.32109561783599183, -0.27597587181665273], [-0.900657172461514, 0.99671044544470488, 0.70513666116017237], [-0.98436445255016158, -0.6646591961818471, 0.81899421862757404]]], [[[-0.75353801541710408, -0.4844969746507648, -0.60779253145912082], [-0.22260975132489258, -0.72550203151478265, 0.82432528676744976], [0.36186842836242294, 0.6288466002139681, 0.29912146643258031]], [[0.34287946260876745, -0.96393365203713977, 0.82874109661960604], [0.37648410661020693, 0.68677516589398979, -0.63944982124889793], [0.088936729665060055, 0.23451034722387765, -0.12265142110905081]], [[0.22438913453544207, -0.86235216728923625, 0.42518095985105742], [-0.0057996159483999499, 0.17279591428428764, -0.89314146884061363], [-0.64659071962010817, -0.9620486023106114, 0.18236354830163459]], [[0.70827276782847082, -0.64949227504852414, 0.90449716754632958], [0.39250499295630714, 0.85495105604645638, 0.23199269798993538], [-0.70758393714806056, 0.82949591433851499, 0.19142497272411951]]], [[[-0.72742189907432531, 0.19054896420595657, -0.99846028575082668], [0.69236615347076214, -0.26850684615265696, 0.99642105555881311], [-0.61159113962912026, -0.0010060673835490253, -0.12293552117293705]], [[0.11422273894067647, 0.66181925449772794, 0.049969313090909795], [0.014045983578708787, 0.25966950739978367, 0.33250897797804813], [-0.037485300265705845, 0.0032643611075411361, -0.72385175653538081]], [[-0.0085272589489473472, -0.091792665957439734, 0.13365663576802866], [0.47304356097807765, 0.53855602115799228, -0.95903528834203255], [-0.13242427641640986, -0.84228532486084484, 0.045152429530008975]], [[0.94913694432499662, -0.054405243536918668, -0.35315049541198285], [0.1230371072222487, 0.087855818368372418, 0.84445539326056562], [0.28372825891656372, 0.59313567136600676, 0.36893363041941596]]], [[[-0.35816208534985461, -0.99197215517744985, -0.29818815612648142], [-0.056252809805036552, 0.15202002205958065, -0.23909348794187513], [-0.43651255141455847, 0.96730218374677612, 0.38036444564133842]], [[-0.47843489879143974, 0.34666997198601801, -0.93482049458849392], [0.0090423067274332247, 0.26336489996468759, 0.9084512950301793], [-0.91541175783339157, -0.32154234805168125, 0.2161637859166492]], [[-0.31221318697860245, -0.41525469271531668, -0.30297623580764288], [-0.95894357940997432, -0.30343313787034698, 0.13846518764532312], [0.65942679772404778, 0.61654525284249573, -0.16196681112024369]], [[-0.10801907193802518, 0.13943638630385236, 0.5569193941242947], [-0.033086610339237765, 0.31320692376771397, -0.64881863504146642], [-0.54144841066778793, -0.13382833440969488, 0.84579855626382705]]], [[[-0.56410563230748267, 0.78450547341369181, -0.71149742705507291], [0.27405382527016453, -0.10296459369324906, 0.29588472319315695], [-0.20343841258423367, 0.30064806958487744, 0.8667495722384968]], [[0.046594149144233432, -0.81043380740304327, 0.85409578351661564], [0.051155112370231404, -0.94074316813100811, -0.44848604282051019], [0.38403570149808819, 0.20878956456622366, -0.33091986722714917]], [[0.49999376465570067, 0.34916275252824347, -0.87557977159285105], [0.73493179934426234, 0.033838352797257221, 0.056981370252029873], [0.2127555878843459, -0.1447240590187906, -0.5014394065038783]], [[-0.017018741273441051, 0.73225607665268178, 0.42525460662554226], [0.43489644051443599, -0.91158862001569418, -0.32183161773893132], [0.85595093680427281, 0.30475043041571026, 0.48070288067212563]]], [[[-0.38254766533673812, 0.2235940242840857, 0.8074948288364916], [-0.95706744154356138, 0.56477657497496203, 0.28456728586213287], [-0.27846248623021475, -0.74638639277917762, 0.44910974387764746]], [[-0.85235553334961067, -0.68290026776848611, -0.80398309040797034], [0.043652592125658529, -0.32158945812976469, 0.65305722905769037], [-0.67128656499519956, 0.92476445177995337, 0.85383064431105238]], [[-0.54560334446041803, -0.27597773138904835, 0.18317273329482675], [-0.55504603414938836, 0.58056001729567197, -0.5816256098620376], [0.87034872823592613, -0.024817123583893652, -0.036174529851967341]], [[-0.47756647696617716, -0.096616446848009963, 0.69292352709980154], [0.41310299561282982, 0.83487076729819032, -0.94885113495052753], [0.24633414370942663, -0.85861844670670173, 0.061599745561401908]]]])
1750            ref=trace(xx,2)
1751            res=Evaluator(y)(x=xx)
1752            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1753
1754        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1755        def test_swap_axes_Symbol_rank2_axes01(self):
1756            shape=(2, 4)
1757            x=Symbol('x', shape)
1758            y=swap_axes(x,0,1)
1759            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1760            xx=numpy.array([[0.9209253484509683, 0.89609261307073029, 0.53337710112116832, -0.55117286745601879], [0.48518410365355891, 0.83428060745353427, -0.23839302347725733, -0.29728794004076331]])
1761            ref=swap_axes(xx,0,1)
1762            res=Evaluator(y)(x=xx)
1763            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1764        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1765        def test_swap_axes_Symbol_rank3_axes01(self):
1766            shape=(4, 1, 3)
1767            x=Symbol('x', shape)
1768            y=swap_axes(x,0,1)
1769            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1770            xx=numpy.array([[[0.25818737877723863, 0.92403845097356929, -0.49976046931292939]], [[-0.84966714008798272, 0.19107704051611529, -0.058364979877173928]], [[0.71842230089762871, -0.61164986603173865, -0.030793548408475813]], [[-0.13997844340902033, 0.28019211972228719, 0.83907141436660249]]])
1771            ref=swap_axes(xx,0,1)
1772            res=Evaluator(y)(x=xx)
1773            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1774        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1775        def test_swap_axes_Symbol_rank3_axes02(self):
1776            shape=(6, 2, 1)
1777            x=Symbol('x', shape)
1778            y=swap_axes(x,0,2)
1779            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1780            xx=numpy.array([[[0.037942303884782147], [0.54848506357865001]], [[0.29468221333315125], [-0.4699424088656281]], [[0.81131954585480792], [0.85686363114663266]], [[-0.094482240266518636], [0.68499498914111845]], [[-0.80627838311672728], [0.41802904802064567]], [[0.14431077308833418], [-0.57782286798520555]]])
1781            ref=swap_axes(xx,0,2)
1782            res=Evaluator(y)(x=xx)
1783            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1784        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1785        def test_swap_axes_Symbol_rank3_axes12(self):
1786            shape=(5, 6, 1)
1787            x=Symbol('x', shape)
1788            y=swap_axes(x,1,2)
1789            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1790            xx=numpy.array([[[0.38094499847271557], [0.95436859968594723], [-0.11817210189228344], [0.028931688531394828], [0.09206328096944949], [-0.62794736241284443]], [[-0.90431912923729851], [-0.06236550240103611], [0.88191933141804757], [-0.096446164799557366], [0.34131501950267196], [0.17417410787579102]], [[0.20872908433802784], [0.11250474685929857], [0.79407800154099872], [-0.5085970381524676], [0.64335804618478032], [0.29006161738794844]], [[-0.8919438571977325], [-0.96332896309607352], [0.17594047591175221], [0.82690373765563274], [-0.89674602977206752], [0.43713545483286675]], [[0.7784120733305826], [-0.60979630722919387], [-0.29163020813283635], [0.34321858240263436], [-0.25632487066285337], [0.45965847528208781]]])
1791            ref=swap_axes(xx,1,2)
1792            res=Evaluator(y)(x=xx)
1793            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1794        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1795        def test_swap_axes_Symbol_rank4_axes01(self):
1796            shape=(6, 3, 3, 1)
1797            x=Symbol('x', shape)
1798            y=swap_axes(x,0,1)
1799            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1800            xx=numpy.array([[[[0.10818338739689937], [0.13500597176224205], [0.89756164029803198]], [[0.5454249317296409], [-0.28076228851100149], [-0.91132226396572835]], [[0.97761141412746944], [0.30300997737654201], [-0.61094744480041063]]], [[[0.79329570798490678], [0.37389766864950058], [0.80529979188341128]], [[0.31786961496009458], [-0.49207596030980083], [0.80562629178646583]], [[-0.36912836108700753], [-0.54095378688868889], [-0.4468014311504811]]], [[[0.016940851764116749], [0.94864895018291295], [-0.56674028817469524]], [[0.61978906925748811], [0.46041335000223782], [-0.24435680129878357]], [[0.56808009922250813], [0.55483775627393506], [-0.82263720844794497]]], [[[-0.37277133452884859], [0.22189238933143618], [0.66822756157343788]], [[-0.4261246432887309], [-0.69393329922812574], [-0.079937948130046177]], [[0.40931705576524102], [0.71266374728059345], [0.59621552392437915]]], [[[-0.20675658088499338], [-0.22456593561021232], [-0.95302152772759152]], [[0.21823122584269239], [0.15972307211673487], [0.53690574939342794]], [[0.9544128276635242], [-0.49909348205429382], [-0.050575550863879659]]], [[[-0.30857024641538433], [-0.8395897486686783], [0.40675501798052371]], [[-0.534406663210657], [-0.42577205405376839], [0.33817510600543166]], [[0.042762076798115611], [-0.94621276371280216], [0.7983567742968527]]]])
1801            ref=swap_axes(xx,0,1)
1802            res=Evaluator(y)(x=xx)
1803            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1804        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1805        def test_swap_axes_Symbol_rank4_axes02(self):
1806            shape=(5, 1, 5, 6)
1807            x=Symbol('x', shape)
1808            y=swap_axes(x,0,2)
1809            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1810            xx=numpy.array([[[[0.68785520524653543, -0.070411075522871513, -0.32176642958577562, 0.11670324855057612, 0.23587159472483776, 0.17463506689285158], [-0.075637171215478638, -0.14698385141961934, 0.70972564640100955, -0.71007530291056886, 0.23352061767906429, -0.71714409407105073], [-0.29186430225072413, -0.59061685765299599, 0.47231993808921535, 0.093352350686652485, 0.62552823584286177, -0.27858554150140513], [-0.049054144465585647, -0.84606629461334659, -0.42546643528470995, 0.55314736584725943, 0.43232161053808116, 0.012473521955916889], [-0.23344577777609321, -0.1819836177179639, 0.692479836303171, 0.5774960737450936, 0.52257674900401718, 0.84202334929618061]]], [[[-0.58786364630383292, -0.88157439319467135, 0.62125046725146582, 0.73681875756241411, 0.78260879596294219, 0.12997264203949133], [0.28957933360550325, -0.69884873656732682, 0.48340629537665647, 0.37476720771215644, -0.93068526232136661, 0.99984923059010877], [-0.50112856751133172, 0.5542678476997942, 0.52095435899104481, -0.96276814105310238, -0.072941187169336175, -0.54345075755235839], [0.40785539522032499, -0.3150602861404519, 0.87554359745582433, 0.29586125675829322, -0.86043818777490988, -0.37650553897168804], [-0.62109638048277249, -0.63083877345665607, 0.67533023849252327, -0.67433479950698816, -0.75926555524275874, 0.81108294317305196]]], [[[0.74315571378528089, 0.75372827265485398, -0.92631697157743176, -0.21415965528996095, -0.32444155620333648, 0.74090732165224216], [-0.63209341633997518, 0.9234199133133052, -0.56076778067183541, -0.90368519789604695, 0.013917642804893049, -0.69416396264082181], [0.69256058497296613, 0.24496358210574365, -0.10547003576852609, 0.57142870632648757, 0.94045151609009325, -0.91990657832493783], [-0.57681797847165028, -0.066315673111125628, 0.91933549014034499, -0.66013459125550589, 0.59562782006886916, 0.59776951034920733], [0.59638407472344412, -0.53284442708651092, 0.3907557421062835, 0.061134639996943685, 0.63651201379664246, -0.47395877428717292]]], [[[-0.64836158777207076, 0.25733454782289322, 0.16841380005738937, 0.30930484446529594, -0.90387541311536079, -0.13116215696850819], [0.66879432010858797, 0.5198605090256021, -0.029257566596547324, -0.62845990152522879, -0.41987311367557889, 0.49133079575521932], [-0.60265438823128692, 0.57650601998836559, -0.76111250784466522, -0.3569568865365178, -0.80118182409600136, 0.21878600838176321], [-0.17701028132353702, 0.9824878793463554, 0.53030502018766712, 0.37627214651407659, -0.5806233508450398, -0.89785432541444754], [-0.54235873074135754, -0.94786060332543443, 0.52897811361639424, -0.70492938629438129, -0.16869214583993086, -0.95063712883575491]]], [[[-0.40094660179938013, -0.73296594719552743, -0.97806470006788793, -0.39353520150348409, 0.97585148011404566, 0.33636687955497213], [-0.1966472189332551, 0.16664049351813115, 0.40797999783544125, -0.89034075374453581, 0.96769474121061982, 0.6085382118474012], [0.21570587453544454, 0.011428887597838333, -0.38685916497758788, 0.60268941752359595, -0.88565706806393885, 0.60709276083454888], [-0.36208161460970145, -0.7348854735890713, 0.31492210640095597, -0.81274505481999793, -0.036915174685380414, 0.71890001317249563], [-0.60680748471625212, 0.16517167977367087, -0.40164719898262802, 0.108738260298475, 0.88813402528543484, 0.020471023972875368]]]])
1811            ref=swap_axes(xx,0,2)
1812            res=Evaluator(y)(x=xx)
1813            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1814        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1815        def test_swap_axes_Symbol_rank4_axes03(self):
1816            shape=(5, 3, 3, 6)
1817            x=Symbol('x', shape)
1818            y=swap_axes(x,0,3)
1819            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1820            xx=numpy.array([[[[0.4212844631827799, -0.84682766954388655, 0.76060723376957151, 0.82363554957146734, -0.15787351163938168, 0.92496453737788342], [-0.27901840421474655, -0.067277068250086502, 0.79170992887149039, 0.71150812754633863, -0.068029989014853465, 0.35361285059451331], [0.84940496389436015, -0.83947234409702887, 0.098915466342164526, 0.85571661907072394, 0.71208430504865117, 0.52387810986886207]], [[-0.48979947613317831, -0.63541549651613316, 0.49398906608296045, 0.25774002564566478, -0.55356297858131365, -0.51011550211785428], [0.55000230374696213, 0.24460407530304784, -0.0088738478652641284, -0.8936130924321366, 0.47122569976430162, 0.17117050287680313], [-0.042114986245814778, 0.56872056744937982, -0.88735035516429117, 0.2432822939279824, -0.22766370161585003, 0.18822930155226603]], [[0.66412211940664778, 0.028748605397407534, -0.033559402845615649, -0.19898658213011711, -0.5805450420028464, -0.39949500220338119], [0.65429860692226649, -0.22316690829000252, -0.26191936110912706, -0.6429961558388031, 0.66290617486046588, 0.6818549064932069], [-0.63102404284186009, -0.83641806257441642, -0.20353204507737188, -0.32106134497032746, 0.33173208794181552, -0.20363198606595589]]], [[[-0.54046531588947655, -0.55271256999294582, -0.3290614247682373, 0.36802203018383728, -0.9370567661458642, -0.59263047156834747], [0.70606386902163454, -0.23441225444357761, -0.49441949777001803, 0.78717769772527846, -0.73919322115604058, -0.98036777195344604], [-0.36780168474029851, -0.47866064432601729, -0.5742330209493427, 0.99930983291422448, -0.77634403712678579, -0.48520054029977855]], [[0.06280607779997549, -0.35715903505726732, -0.11871103676152628, 0.18588200508098685, 0.91212265485151445, 0.27394399201814124], [0.28734143380707367, 0.79251920717420821, -0.60169886611382983, 0.056493159800269366, -0.66907546644256333, 0.8935580241190233], [-0.23967604704736445, 0.30507144105805617, 0.036074407036116973, -0.33532150005797123, -0.10353881007018817, 0.79601472913384952]], [[0.58492221657828503, 0.87667213626202511, 0.78035013018070121, 0.39272647832481855, -0.38194823743397821, -0.014553605015940274], [0.70681440903759762, 0.63683600698895959, 0.86696263249217065, 0.97306897648159718, 0.50180182900405956, 0.96670704711357502], [-0.15711029875455007, 0.76551513139305216, -0.53594851479017613, -0.48827037945646667, 0.70783145966700722, -0.35448324452686975]]], [[[-0.73733451347464296, 0.032136037270557916, 0.16046101266573864, -0.16646679499526185, 0.98625465513059307, -0.30112254823002171], [0.42336306092093556, -0.47567244491146221, -0.83327640796934177, 0.48290888386334663, 0.45841070283918861, 0.036117299261763769], [-0.49382078447277267, -0.49089802192785514, 0.014467401172693961, 0.13809971884784633, -0.43710087084386018, 0.88073874723818601]], [[0.55888543002274771, 0.27496479837460819, -0.44943522537219516, -0.54506342105687722, -0.87242471826738743, 0.58196097377899769], [0.40573488296110938, 0.011014190419628589, -0.71546271761695879, 0.17604148176379919, -0.058866024617525881, -0.86506473494267699], [0.43963746416888538, 0.41332710570538356, -0.19987538232655733, 0.46645753636686527, -0.048406613220982386, -0.22247949015284019]], [[0.12354133828505676, 0.74114598911366092, 0.60059126589601375, 0.68689693500766835, -0.25334272183152851, -0.13020688830113558], [-0.87858271757116446, -0.48640039611484798, 0.08318351252486722, 0.52114823632333351, -0.21770897584963622, -0.82560375957656729], [0.41321093559238187, 0.83067842671514791, -0.59784028477967688, -0.15106250277563937, -0.55391926458906671, 0.71088028787580004]]], [[[-0.79913336052683914, -0.84107420507513719, 0.73505811466256143, -0.50574266070251461, -0.14144529814476425, -0.90923534790771177], [-0.7662800353175625, 0.1497511364855979, -0.076362046183220622, -0.42346679285080091, 0.12589981165754138, -0.22581963303984964], [-0.86111454570394064, -0.58759211518713927, 0.63497819833894775, 0.90196968157623036, -0.72369843836375791, 0.10123868081912879]], [[-0.96970622084661828, -0.095881459621218523, -0.96717920897773846, -0.37334690066212017, -0.49042501156120655, -0.43221199636102736], [-0.14774072274442451, 0.42023130290501354, -0.46043268632038958, -0.8549486529882333, 0.53323985555909981, -0.023198200473047326], [0.66253424575709641, -0.39347116321997877, -0.33037639116739359, 0.79359045281156093, -0.8451601661126753, -0.36791089879785854]], [[-0.90622401938788943, -0.56834820676455866, 0.78391243750566164, -0.85934013078793692, -0.015240994316236156, 0.25359494815198858], [0.44729142663728338, 0.35798547916496903, -0.90372569215927046, -0.95713879083770337, 0.95781969257678723, 0.35040041383975429], [-0.47921674117850022, 0.56685398816459553, -0.95425450344859297, -0.37910652989558669, 0.53748520559722479, 0.18682524934963474]]], [[[0.49868003218842194, -0.48673136346991663, 0.65553741091405371, -0.048850078894613125, 0.26187624557856304, -0.31322227509095568], [0.41741800708048626, 0.20990639817071166, -0.92181018058854969, 0.64868610538526683, 0.26316045556128476, -0.76656678098182041], [0.50028822653432403, 0.67629687885539069, -0.52250798145908073, 0.043162191239042746, -0.71987547271687569, -0.95617703906117724]], [[0.0044772341077730093, -0.65499137376962957, 0.51498057850934686, 0.60351843374290337, 0.00072027749017511411, 0.13411345750875237], [-0.4483584646310852, -0.67136451845991196, -0.61662855459064669, -0.80368692688515031, 0.73782565743541362, 0.48073342809320652], [-0.40355958185934959, 0.48490875036568393, 0.5700502251944759, 0.54783189580047309, 0.23802880053079511, 0.49968034053708199]], [[0.76799158758581254, 0.54999763325186657, -0.27016857401523486, -0.23603198002977588, 0.79273271437719095, -0.42553396387453102], [-0.066738971431817617, -0.97150627333446837, -0.32466550236925329, -0.77021406404813053, 0.039841054684433885, 0.39733882913111551], [0.01278567395312824, -0.56521621990805015, -0.075162622563856862, 0.21033551820617791, -0.35721711793700406, -0.35251074175199126]]]])
1821            ref=swap_axes(xx,0,3)
1822            res=Evaluator(y)(x=xx)
1823            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1824        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1825        def test_swap_axes_Symbol_rank4_axes12(self):
1826            shape=(4, 6, 1, 1)
1827            x=Symbol('x', shape)
1828            y=swap_axes(x,1,2)
1829            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1830            xx=numpy.array([[[[0.20593144194693647]], [[-0.174271446592551]], [[0.98694286885172766]], [[-0.16689508829617195]], [[0.61693568444248248]], [[0.19463359696591853]]], [[[-0.040205575313067454]], [[-0.63860477784500125]], [[-0.32704342830801503]], [[0.75583014979779839]], [[0.077331760232476565]], [[0.26850401679237801]]], [[[-0.71156258697747843]], [[0.59205853626016514]], [[0.29084099667367025]], [[-0.60238585375685982]], [[0.39830458693931114]], [[0.69236579397668363]]], [[[0.52776927598898649]], [[-0.38508566325454474]], [[-0.76040163088705603]], [[-0.33241561433573596]], [[-0.0065079746669713945]], [[-0.47283339571065497]]]])
1831            ref=swap_axes(xx,1,2)
1832            res=Evaluator(y)(x=xx)
1833            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1834        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1835        def test_swap_axes_Symbol_rank4_axes13(self):
1836            shape=(4, 3, 2, 5)
1837            x=Symbol('x', shape)
1838            y=swap_axes(x,1,3)
1839            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1840            xx=numpy.array([[[[-0.30345108980265656, 0.84894687875396291, -0.65152484783797049, 0.33634877395043783, -0.2097060029645621], [-0.14328101948061689, 0.42284154249131589, -0.54106967318857691, 0.91643276974975962, 0.91986260542801745]], [[-0.20385808234915581, -0.65749724936011256, -0.79265818740801119, 0.58151303044076674, 0.68144979028727892], [-0.52873209172368618, 0.88273256724155758, -0.93172747901867625, -0.1796374621897221, 0.63263423324354084]], [[-0.94498997279517805, 0.75021933716429356, 0.29123246843617334, -0.3482494592595895, -0.18290634842761988], [-0.11066045021167081, 0.68727690227756444, -0.42583024350535337, 0.9377998070277398, 0.94276515240941605]]], [[[0.23784459220685061, 0.16603357530206786, -0.9239649617114607, 0.54741826271391325, -0.17627209821810941], [0.82323197922694513, -0.56456667755557044, 0.76798382673253762, 0.658332057060661, 0.78042329450020365]], [[0.53746736638934189, -0.21425445866448567, 0.79140789359856401, -0.38962020320519164, -0.25931663840140362], [-0.48185378595430839, -0.31787896512063529, -0.25448030680144118, -0.15145913523184862, -0.17543430584506781]], [[0.20095629486410016, -0.99576799216626033, 0.84922140663648915, 0.89223351235746318, -0.98102359312656962], [-0.18666228139237306, -0.5267017598582926, 0.90273654243740098, -0.73717701727197582, -0.81304223819510479]]], [[[0.83114301105252975, -0.72974215812681709, -0.65925104030412429, 0.10737448242965786, 0.83614065899453283], [0.70391525625953744, 0.34712028851570653, -0.41467077075799286, 0.76222940809620754, -0.66568611974609571]], [[-0.55768535939203989, -0.73226541233487064, -0.18630246324547617, -0.6428437201429591, 0.29146971880154937], [0.66377669798889372, 0.44046490519955062, -0.98878939636194185, 0.63666555159654536, 0.035524618472617675]], [[0.12021612044609209, 0.47495394653152667, 0.15993481229480144, 0.11662848547066096, 0.70938809382161772], [0.5502128002846034, 0.99933183803873282, -0.69545507156645914, -0.075106440719461709, -0.48846809052579454]]], [[[-0.20285349170556377, -0.83323306765845029, -0.18363800596406676, -0.3019912838316543, 0.74727949493045309], [-0.81138260630992631, 0.42419339495564912, -0.53895123743670048, -0.6821328694964286, 0.26734363157384955]], [[0.90097155934036643, -0.22301368675105926, -0.40526153151842559, 0.75137573945907388, 0.38092862194508248], [-0.057899245852858883, -0.56960709028327527, 0.30679789931511903, 0.81431605358285863, -0.52113915207948636]], [[-0.16715948888461796, 0.23958764677552802, -0.13460712899297045, 0.82698600374659526, -0.81642634624103416], [-0.38257193486570396, 0.3416875791003875, 0.99842495711645918, 0.26303768832113139, -0.37125124341815074]]]])
1841            ref=swap_axes(xx,1,3)
1842            res=Evaluator(y)(x=xx)
1843            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1844        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1845        def test_swap_axes_Symbol_rank4_axes23(self):
1846            shape=(6, 2, 3, 4)
1847            x=Symbol('x', shape)
1848            y=swap_axes(x,2,3)
1849            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1850            xx=numpy.array([[[[0.25657652614379822, 0.67438122852824178, 0.47257402802584325, -0.14748508547218653], [-0.14786461526085692, -0.09835856448720004, -0.83606719648678207, -0.9122040014783257], [0.51649815984720338, -0.61860268890048009, 0.1426121300193246, 0.12402267027633207]], [[0.43971641469404843, 0.28735189724044652, 0.90392014795090581, 0.081568905926356239], [-0.1999991252499127, 0.82996282913558983, 0.12365803261896979, -0.38153817778059662], [-0.71101475693425886, 0.82244978274736025, -0.76468367410513327, -0.91616774229555564]]], [[[0.23730422440663346, 0.80601592116398546, -0.92486821916379336, -0.96297223564707757], [0.7035707718877291, -0.24213704419775683, -0.30936793008695807, 0.25240509670193267], [0.37900289800179476, -0.40865630791319463, -0.82701706609140402, -0.14358801671275101]], [[-0.68056445827095846, 0.59958980489831326, 0.065736383057739767, -0.037125753607125223], [-0.71305726498395172, -0.93768846581698684, 0.58858929802597637, -0.94682518553590067], [0.65054448848886759, 0.64255774009521116, -0.8663874477121889, -0.47645216466563878]]], [[[0.36934540778857095, -0.19952010057807468, -0.41894230084432182, -0.93514443349944054], [-0.95429288277895585, 0.25098858975577798, 0.94595660096442047, 0.24966877114973052], [0.46910612651839356, -0.91943007359736439, -0.83784016528259464, -0.56343725890681617]], [[0.46193306159203029, 0.68811489083938349, -0.51248471309672849, 0.94913455368511213], [0.23236372956092333, 0.15122922482178569, -0.22198949757456909, -0.69866822786810845], [0.82142104413399908, -0.44871590486526736, 0.93682237273059532, 0.6668540215333929]]], [[[0.11530733492744516, 0.48694815788982559, 0.72190048248092431, 0.44770899728475189], [0.90774337418994122, -0.051637477688375011, -0.65767069275504197, -0.45179710379652316], [0.51167906292335497, 0.0064169900383206357, -0.25904012959693934, 0.53980163403546944]], [[-0.19255519657811515, 0.70950026010649303, -0.50049683604420614, 0.83586318368039492], [-0.84146453390379961, -0.11861751628055273, 0.72991780293781394, -0.29635227676705123], [0.94668644705379124, 0.16733406394223027, 0.70551272816148369, 0.10550906516050484]]], [[[-0.095256368803380287, -0.035234358832767931, -0.41692009532704755, 0.87951410426752319], [-0.16476833343375885, -0.30732718084229771, -0.26118998562113793, 0.79193853595647301], [0.35564734445592583, -0.60351227415107545, 0.43928037707465517, -0.72844214078672764]], [[0.69745992013941094, 0.51619878167591327, -0.026429354145893758, -0.12618798776102991], [0.97689656017720949, 0.029404721928852684, -0.44766199990795252, 0.5072146630591774], [0.56923058578896413, -0.39108538123670722, -0.066641513101604044, -0.21819702355681247]]], [[[0.5945970671837133, -0.69280022186017653, 0.41847733304643064, 0.83503208767528814], [-0.43469287773169918, -0.17612844630013313, -0.5011783797027165, 0.82655481945852083], [-0.42510908578546647, 0.49075339944530971, -0.044457477969722436, -0.12636124250277736]], [[0.95900385775713937, 0.18395499581767338, 0.21571266328536542, 0.65656926013908001], [0.15705695866220482, 0.23557634928863247, 0.39812296767947952, 0.13234790162709054], [0.049842636992127209, -0.98080324163116983, -0.08951176480893297, 0.28788555627014611]]]])
1851            ref=swap_axes(xx,2,3)
1852            res=Evaluator(y)(x=xx)
1853            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1854
1855        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1856        def test_clip_Symbol_rank0(self):
1857            shape=()
1858            x=Symbol('x', shape)
1859            y=clip(x,0.408556,0.759323)
1860            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1861            xx=numpy.array(0.00157076195697)
1862            ref=clip(xx,0.408556,0.759323)
1863            res=Evaluator(y)(x=xx)
1864            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1865        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1866        def test_clip_Symbol_rank1(self):
1867            shape=(5,)
1868            x=Symbol('x', shape)
1869            y=clip(x,0.336596,0.586054)
1870            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1871            xx=numpy.array([0.5613997196400704, 0.68097534947863148, 0.55710550468097786, 0.8334241393343973, -0.90096564032916504])
1872            ref=clip(xx,0.336596,0.586054)
1873            res=Evaluator(y)(x=xx)
1874            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1875        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1876        def test_clip_Symbol_rank2(self):
1877            shape=(5, 2)
1878            x=Symbol('x', shape)
1879            y=clip(x,0.492917,0.678447)
1880            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1881            xx=numpy.array([[0.58761948756117821, -0.46037862321955125], [-0.34367335730570181, 0.92883918877976512], [-0.032227428214630427, 0.83359632987387222], [-0.080279495484635088, 0.72869829458251489], [0.92268299446461843, 0.23799789956581607]])
1882            ref=clip(xx,0.492917,0.678447)
1883            res=Evaluator(y)(x=xx)
1884            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1885        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1886        def test_clip_Symbol_rank3(self):
1887            shape=(4, 4, 2)
1888            x=Symbol('x', shape)
1889            y=clip(x,0.142084,0.894372)
1890            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1891            xx=numpy.array([[[-0.44823468880757877, 0.6204644822067229], [0.69399955950872849, 0.77570681924230112], [0.33881701333008118, 0.53256166612946476], [0.46752519347576693, -0.91720700453285331]], [[0.89259147827326513, 0.44679430877477722], [-0.89133611405538704, 0.97060913821684469], [-0.33936808141167596, -0.94608546618305289], [-0.24332556165077546, -0.26236341722484569]], [[0.22539850161511743, -0.21337675728380123], [0.70085899522421236, -0.13062160166520198], [-0.080473651844689575, 0.92582844431726574], [-0.72383280098271063, -0.55388826794697965]], [[-0.99336986537478, -0.82595349736471158], [0.026713863251344616, 0.51298760556823964], [0.52591720631590388, 0.71740516048897351], [-0.15208005738978136, 0.27239679843782372]]])
1892            ref=clip(xx,0.142084,0.894372)
1893            res=Evaluator(y)(x=xx)
1894            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1895        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1896        def test_clip_Symbol_rank4(self):
1897            shape=(2, 6, 2, 4)
1898            x=Symbol('x', shape)
1899            y=clip(x,0.206311,0.738860)
1900            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1901            xx=numpy.array([[[[-0.23017657319445939, -0.9913799344317491, -0.71043449448776608, 0.103405494502957], [0.26425209929726945, -0.93274255541070938, -0.71961715155039507, 0.62054109456939188]], [[-0.63598215824430415, -0.16035711847695233, 0.16105251318870373, -0.9660483513088387], [-0.91168427933036766, -0.48077452618324057, 0.24219651060469016, -0.99091448930655912]], [[-0.44644290073000015, -0.22828623732012865, -0.64063344397379995, -0.42144566024803276], [-0.52888749928748191, -0.28266162922536631, 0.1904874332090869, -0.48899365750997981]], [[-0.98994438328851131, 0.76646691147786439, 0.99526091979042786, 0.27557269856047806], [-0.79777454205634046, 0.24800632771264319, 0.40310052137036667, 0.80014670700891433]], [[-0.37621961537750348, -0.88986285012717525, -0.39137987585393552, 0.98176280567877039], [0.0012435282505136591, 0.737549820643707, 0.85941954677696475, 0.79739492366126186]], [[0.32724430473412935, 0.39904670738770731, -0.53342728366956016, 0.077745892449792908], [0.59218780466715448, 0.46691940336748372, -0.85034278531490326, 0.12730547602663767]]], [[[0.72137751499058411, 0.47374717632369223, 0.31193939062707488, 0.19548655883415922], [-0.22352120140188925, 0.284277068079543, -0.79571479676724977, 0.84357452849936898]], [[0.63483874044166178, -0.92084830832749209, -0.55787439417586127, 0.60024782927783615], [0.54187933873175576, 0.80191362743343153, -0.68915957663778293, -0.4913339629842135]], [[-0.81080767618531113, -0.61883189469019761, 0.22654339619350128, 0.22575709768876151], [0.26480228125963445, -0.25538627973278327, 0.59791167859057603, -0.38494596237234191]], [[-0.099926811869933685, 0.28079554366494275, -0.44248967285625107, -0.57232861797726575], [-0.50924920611884494, -0.8218685673680739, 0.28680898335288108, 0.3579176643766051]], [[0.40559643348920793, -0.18286245231913445, 0.41913313035703448, -0.58890731430591026], [0.94461316708814902, -0.49998086821311394, 0.32672468803684818, -0.81950975258672165]], [[0.58183423418999469, -0.80401899830712908, -0.933625601495508, 0.20371883807911928], [0.35999605550847713, 0.10957668297950152, 0.82238147977014608, -0.47626309930983424]]]])
1902            ref=clip(xx,0.206311,0.738860)
1903            res=Evaluator(y)(x=xx)
1904            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1905
1906        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1907        def test_inner_Symbol_rank0(self):
1908            shape=()
1909            x,y=symbols('x,y', shape=shape)
1910          z=inner(x,y)          z=inner(x,y)
1911          self.assertTrue(isinstance(z, Symbol), "wrong type of result")          self.assertTrue(isinstance(z, Symbol), "wrong type of result")
1912          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array(0.60061490208)
1913          yy=RandomData((4,4), FunctionSpace())          yy=numpy.array(0.368032142104)
1914          ref=inner(xx,yy)          ref=inner(xx,yy)
1915          res=Evaluator(z)(x=xx, y=yy)          res=Evaluator(z)(x=xx,y=yy)
1916          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1917      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1918      def test_outer_Symbol(self):      def test_inner_Symbol_rank1(self):
1919          x,y=symbols('x,y', shape=(4,4))          shape=(5,)
1920          z=outer(x,y)          x,y=symbols('x,y', shape=shape)
1921            z=inner(x,y)
1922            self.assertTrue(isinstance(z, Symbol), "wrong type of result")
1923            xx=numpy.array([-0.11979563319368602, -0.49612889788647907, -0.14985618804426304, -0.85117752987913353, -0.1252071689123182])
1924            yy=numpy.array([0.62220243488367477, 0.9166595276976619, -0.14645704545756044, -0.18691514832596701, -0.33889323130813231])
1925            ref=inner(xx,yy)
1926            res=Evaluator(z)(x=xx,y=yy)
1927            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1928        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1929        def test_inner_Symbol_rank2(self):
1930            shape=(2, 1)
1931            x,y=symbols('x,y', shape=shape)
1932            z=inner(x,y)
1933          self.assertTrue(isinstance(z, Symbol), "wrong type of result")          self.assertTrue(isinstance(z, Symbol), "wrong type of result")
1934          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array([[-0.27985215874445046], [-0.1623563275104607]])
1935          yy=RandomData((4,4), FunctionSpace())          yy=numpy.array([[-0.53267484001798371], [-0.0044469421309056845]])
1936            ref=inner(xx,yy)
1937            res=Evaluator(z)(x=xx,y=yy)
1938            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1939        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1940        def test_inner_Symbol_rank3(self):
1941            shape=(6, 3, 5)
1942            x,y=symbols('x,y', shape=shape)
1943            z=inner(x,y)
1944            self.assertTrue(isinstance(z, Symbol), "wrong type of result")
1945            xx=numpy.array([[[-0.55968600681606651, -0.99075027598290344, -0.36191743265791465, -0.12829870585252912, -0.59352775670108238], [0.45367419340063453, -0.29147002456455429, 0.32125946951425033, -0.27145252832091393, -0.83663359145272698], [0.25692042597416287, -0.66160952051768041, -0.35081703257813746, 0.50625241766495099, 0.4949120986412614]], [[-0.4562568917172094, 0.49326308342291947, -0.64496623452122837, 0.42756305522001226, -0.7287338604299074], [-0.2640083215886444, -0.20153649351299796, -0.65057694598667726, -0.74372721999978997, 0.69925620734160177], [0.54924564795235153, -0.023427977126797561, -0.29950251389892801, 0.51790526343965437, -0.58351488055482181]], [[-0.9011936231737665, -0.97495794727375018, 0.30584095924881405, -0.58871298666131233, 0.76822642355350701], [-0.48177722332222594, 0.19407281873668425, 0.43008159444715166, 0.708856779029299, 0.33517997558506507], [-0.22635568156676111, -0.24759632737082726, 0.35486864308204491, -0.3421589081730585, 0.72152072329590355]], [[0.46149909870813799, -0.035499409999059539, 0.69869204062432599, -0.83420692819421793, -0.43899871380753885], [0.029041565012455806, 0.70484130235946241, 0.99283722233922211, -0.39623464302415279, -0.32422757423332449], [-0.98150772783978302, -0.76762860347429673, -0.35131841721430934, -0.87915983182563973, 0.089420744544111752]], [[-0.74547388265275849, -0.21652127970777379, -0.99310972638258832, 0.027162156076045996, -0.38905437612483329], [-0.77593393269367161, 0.039946680771294263, -0.13443277797197517, 0.15210000749530073, 0.76195501664920973], [0.52021792823588164, -0.8842150808340834, -0.50352837798491668, 0.28939528113867508, 0.37229692527731117]], [[0.080383304291641533, 0.98200555505871412, -0.52651542027610421, 0.96806548827500349, 0.7441709288806504], [-0.35708195611301496, -0.36068935588502504, -0.093142003326600387, -0.59803752503479202, -0.20823425237355697], [0.88584431312854051, 0.5093108407946334, 0.58079641376908375, 0.55865372067291452, 0.63113886746475223]]])
1946            yy=numpy.array([[[0.50589971387205712, -0.4414464640665019, -0.75950795541107019, -0.10886255155789359, 0.66258806567077233], [0.3039441437385213, -0.67853415941241191, 0.43514668568641368, 0.16502772246026187, -0.93406260030877175], [0.58076133532303187, 0.59754561542576701, 0.49040725247224071, 0.12403871290639801, -0.90316212571428967]], [[-0.74379891827922706, 0.049166822527366927, -0.72934897146892452, -0.84509834817348395, -0.3314727640855446], [-0.69548217348933417, 0.78902161328939346, -0.22028244832483934, -0.53424003873646808, -0.63115901136876329], [0.21928364434115011, 0.87861298998741333, -0.59309991245142091, -0.16326643284557996, -0.38628522409342092]], [[-0.28160694965612465, 0.88730837512884375, 0.39523367718447133, -0.24471276108316076, -0.036751684813167929], [0.30767125051630417, 0.53694595061135342, -0.34033943208929762, 0.069397203314602418, -0.68411610682917545], [-0.39751045935093465, 0.30283558595735904, 0.080715234922260182, -0.46831014630827905, -0.38559115002120414]], [[0.11378661273077095, 0.15260550114470717, -0.86983208162401704, 0.90745184763160713, 0.71656174724229049], [-0.30977729708312052, 0.68983823600946903, -0.66156647633263166, 0.59321664449648037, -0.76375004776428157], [0.29100352218605141, 0.17832528273478232, -0.32524692191236815, -0.32128025244891023, -0.84870685284120206]], [[0.22148363881031807, -0.21535259687303432, 0.50310013875430926, -0.4633294060510984, 0.54950205407985564], [0.68409185504005565, -0.30798586915059945, 0.18441398956089139, 0.50215450879525036, 0.19564100616591951], [-0.38324566542898686, 0.3175438392619494, -0.64475433689712291, -0.48669592769541392, -0.020457436596544198]], [[-0.75718466403205498, 0.57521907251122117, -0.17198929835356336, 0.42674263280209779, 0.96611253897619975], [0.069654614111870128, 0.97586681454825297, -0.55814551899501463, -0.49003604599599671, -0.29202590379619742], [-0.33133642864622637, -0.9993229893567348, 0.76646233449459955, 0.62716029755567382, -0.04344643571054041]]])
1947            ref=inner(xx,yy)
1948            res=Evaluator(z)(x=xx,y=yy)
1949            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1950        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1951        def test_inner_Symbol_rank4(self):
1952            shape=(6, 5, 3, 5)
1953            x,y=symbols('x,y', shape=shape)
1954            z=inner(x,y)
1955            self.assertTrue(isinstance(z, Symbol), "wrong type of result")
1956            xx=numpy.array([[[[0.14759316285737389, 0.82816827142914273, -0.40945037889773506, 0.99498128261926322, 0.44309797714678978], [-0.87413166142487286, -0.35093685981640821, -0.77941367060823685, 0.060324431144431978, -0.65528882368271235], [0.49606566254872764, -0.51428672746086068, 0.77483146292580685, -0.76325577133424738, -0.88407427380813153]], [[0.84078595137290102, 0.54435982069902367, 0.35863099616166627, 0.23874917697385833, 0.80142871696446027], [0.10844467456815665, 0.95435086911202371, -0.83367136602230718, -0.37017316093907038, 0.36657524216646276], [-0.85481810966396843, -0.060324146382506383, 0.330296354024324, 0.3115866161011045, -0.64169015497126991]], [[0.8758210073805035, -0.062329210426895099, 0.41745465496032996, -0.29113059215466564, 0.058670977736120955], [0.51529424902469634, 0.35621537306351336, 0.27708413541652255, -0.063685296522967727, 0.78187467457016746], [-0.34757299379144313, -0.39143575838516553, 0.68027260336164153, 0.29148370892137776, -0.16460415714175314]], [[-0.58171291314227713, 0.89127981491797326, -0.24166589224715751, 0.42060370127662039, 0.79400288154334819], [0.41445883407297712, -0.83653340454651537, -0.13400323017877813, 0.46923359276300536, 0.35668609112656413], [-0.59238928022453963, -0.22878588605229133, -0.38202848426322977, -0.48062635629058303, -0.41661628776387349]], [[-0.62681397103666114, 0.53008204749835164, -0.60586573899320806, -0.55230933317710496, -0.28529058756815351], [-0.96216738165990634, -0.50659899596192459, 0.23576955511977249, 0.56429955889630734, 0.3677283599942176], [-0.43396044405775092, 0.59360285535688417, -0.87444670696994908, 0.66485793212884947, -0.67103781540814711]]], [[[0.20525142363983284, 0.59716507424907661, -0.55975600784348845, 0.10284249973819781, 0.95728737888125415], [-0.053623124628934926, 0.10047158065341844, 0.55345652050442484, 0.74746886949693581, 0.87707087276452023], [-0.8971354613377045, 0.055424865845791871, 0.20750606304942387, 0.079438365591430582, -0.53944135927614867]], [[-0.17090751782895586, -0.0035885982597845256, -0.10761206939493762, -0.66979231784219317, 0.70456988086640648], [0.52645907599446717, -0.24792729979917683, -0.24043663285826189, 0.49099567809161271, -0.3841957861680152], [0.1691616745940121, 0.56017253482117169, 0.23179444830841578, -0.64459182135907467, -0.4478796258480775]], [[-0.5145119253872481, 0.4668558412094177, 0.96842297749542361, 0.056068562599582927, -0.85480655477122092], [-0.31286409164448314, 0.18777214263404152, -0.44149854042707215, -0.73262936105200693, 0.40425681003584013], [-0.032521269171860823, -0.2974408267262949, -0.25400200739372458, -0.50353819365649799, 0.91063278838359962]], [[-0.44372434344379208, -0.63836334739321421, -0.96252774990148082, -0.2938720264911614, 0.02504564495611894], [-0.51674182122794909, 0.82680505999492504, 0.71236956243512917, 0.74764631453334274, 0.56910674726796251], [-0.038951004144538226, 0.060688532111767612, 0.38634268352040135, -0.2220260022895888, -0.16440360830268252]], [[-0.97784935376771043, 0.81964574621361308, 0.46894173088555569, -0.45614546561100799, -0.088501210621679371], [0.10589597007673968, -0.98557250064852053, 0.46593301809009868, -0.43209407181947523, 0.92709464924943452], [0.6616311681635485, 0.87371607107766414, 0.5681402004471281, 0.30171853329874154, -0.41183912470069517]]], [[[-0.053646410206180439, -0.42784757577838506, -0.082509898295548556, -0.85846444795664234, 0.080784504249364897], [0.55125335686954902, -0.60895493020258251, -0.080117193117866803, 0.19938178082785107, -0.29946110659623915], [0.95644283045334078, -0.734341172348973, -0.8050654044273402, 0.16865796266229216, -0.31066955475422486]], [[0.26100269578471913, 0.69759426523048429, -0.99585115496854537, -0.92296555252322188, 0.25858970675280735], [0.012276082754948625, 0.86599343120783567, 0.4173766808661945, 0.19044436290606481, 0.30936590026604249], [-0.024414660873382621, 0.26255067739872007, 0.410232807179568, -0.79086340546752276, 0.34201401768212869]], [[0.055723834165235742, 0.93773358853042033, -0.058627288817689083, 0.88792633866589155, -0.73043034957907182], [0.54990295041788517, -0.87646423278922958, 0.36430242747478325, -0.59427140634646536, -0.85240735434338499], [-0.22866980724380048, -0.16357250060052464, 0.74986299092419939, 0.010845038915618277, -0.30823965569235079]], [[-0.67963528103590609, -0.12428242431215786, 0.12064201485950887, 0.36339561984670121, 0.97496449805300367], [-0.36954901895391212, 0.48600462427598146, -0.23510902996604832, 0.76764265695751366, -0.23286104021648435], [0.7701941031971653, -0.48908282621026644, 0.70411653298887811, 0.93718850464800885, 0.52106887681781822]], [[0.52820904979321193, 0.0024419584378359005, 0.4233932061788892, -0.29837250058599074, 0.66776380157537307], [-0.052123205639286629, 0.09759407470878867, 0.33097582265539138, 0.080310266451502743, 0.72076861310530127], [0.80774957584733831, 0.97715523315259434, 0.31561814219514783, 0.57604991936928829, 0.64047324725637367]]], [[[-0.63163437060823702, -0.87110165694100461, 0.26878019195090674, -0.18695016096710115, -0.83447678985766904], [-0.33398051406751827, 0.95442777379103472, 0.91469014023038042, -0.051352370644150325, -0.04501507131932847], [0.22525233617175244, 0.51924273153731426, -0.6968698532611588, -0.13100574700440082, -0.56975870007799179]], [[-0.25975770238385665, 0.91312485033007529, 0.9194644366282132, -0.28971583346689367, -0.87827597275623037], [0.54129157039510623, -0.28460371561556452, -0.41761269889009234, 0.037888951862957931, 0.3804878855859668], [-0.1063929953652325, -0.41052358206312545, -0.74071591180625984, 0.12646936667269193, 0.13936434637741457]], [[0.50810081983019839, 0.79339868428206151, 0.54621646315340144, -0.79329633930832588, 0.51584845336570084], [0.31679758525333646, -0.98061229073891898, -0.77959322511210116, 0.049142940146426728, 0.0040131746399092449], [0.61024051720558381, -0.18076394162169973, 0.4665228664648271, 0.51568736615633326, 0.86891614307757403]], [[-0.60495082180313742, -0.96445031636556688, 0.60729785677128367, -0.29964828569759305, 0.53965635263123479], [0.093905653811512613, 0.44705640786015599, -0.54948657084330654, 0.42398550591118123, -0.46645732256434647], [0.20551436547616864, -0.42501849052259622, -0.76833056813073686, 0.09777942327144773, -0.43300342267571512]], [[0.96317707473361325, 0.56853914818776086, 0.26588795374486884, 0.53487211516308641, 0.31971798549549457], [0.25550257202544047, 0.19022658836382034, 0.20572956616516769, 0.88497986928813566, 0.15344042507316646], [-0.2132400814856299, -0.9063667739068626, -0.35765273859429869, 0.78843963705016873, -0.73966504238198527]]], [[[-0.47177191565156207, -0.64680358212566591, -0.48313590696024522, 0.61309716924831936, 0.95078853472691582], [-0.69616211796948257, -0.90993808584163038, 0.50317751677928868, -0.1373562125583927, 0.87038460491119163], [0.54505769539077642, 0.16898764446181835, 0.29191325122177769, -0.70788724670607106, 0.43333980666153771]], [[-0.88755544719334667, 0.039714842399042993, -0.66016340398436779, -0.071202981949273436, 0.64080035699573701], [-0.89305601025545722, 0.61204795205414397, 0.3340928330580788, 0.30306459571880073, -0.64828396537353306], [0.46547588752764812, 0.022841447207130328, -0.35913459520057844, 0.79369471259782132, 0.32582908823695322]], [[-0.011271670464523043, -0.2831003328359849, 0.22295627511434124, -0.48339833599136495, 0.62362175544202758], [0.21697539743270355, 0.67444554356487973, -0.52077574104636426, -0.35383815057702916, -0.82960789877581598], [0.59854896606483043, 0.89038781603172046, 0.53263870659515633, 0.4257726238112689, -0.40746410224919494]], [[-0.21897723552094073, -0.92919667675816786, 0.52145000619751314, -0.92405731110022615, 0.24419344575430735], [0.97786963540885186, 0.86487261040831398, 0.60924264528787653, -0.64389184948565714, 0.92087913403172617], [0.16146501718021145, -0.88534851389799862, -0.69419523600120914, 0.12862705733006918, 0.54646645233222246]], [[-0.55926424484095882, 0.81646098126831346, 0.23990465273321382, -0.82347004761463949, 0.29668155685856168], [-0.72286019925992218, -0.0026794448069793475, 0.42368335792547795, -0.97800189719826958, -0.46344687178087596], [-0.25292334762280255, 0.53766242470056391, 0.72819326445789501, 0.071604230750794917, -0.78073010121669095]]], [[[0.53370874538222202, -0.35540765674561525, 0.47464121911399437, 0.1070577540406461, -0.65210461810913101], [-0.44699285115436149, -0.81143408755373825, 0.34131834948639739, -0.76248480182419143, -0.6093707806777835], [0.1017005896679819, -0.63485528351738019, -0.17643633039929441, -0.36220780121079521, -0.65997391691214702]], [[-0.53995942422271725, -0.77289663167192613, 0.99264059949208594, 0.78427689375590659, -0.7843840005838012], [-0.39561954654047615, 0.68665729627034855, 0.37348186455523047, -0.85738086385592616, -0.5715637727023728], [0.20127332926967112, -0.520449361733194, 0.13215684365170777, -0.92421658269843809, 0.60782219243615176]], [[-0.28511399149878436, 0.21455844923518619, 0.95836102518058941, 0.63959374483610421, 0.67663854851093097], [0.72404096437532184, 0.99026804279551772, 0.57354247241084133, -0.23855453840492036, 0.74588181462227321], [-0.65206465645125999, 0.14201711654161087, 0.047344057382962434, -0.90463670886848879, 0.4082786472068709]], [[-0.57610263982224685, 0.18746514733383268, 0.15791598468155432, -0.029677600656888847, 0.6891642069707169], [-0.61909049175263631, -0.81286986187486199, 0.68720430260298659, 0.66971786973119296, -0.56586267747061725], [-0.19389819865319602, -0.14486914686593999, 0.16206631594605136, -0.44773902226323736, -0.21102786984199473]], [[-0.25200959731183703, 0.54593239654706127, -0.70495191896091214, -0.61335261141029096, 0.27117951284730868], [0.48020692347120164, -0.83870088469090809, -0.56348855841314371, -0.97184609855911464, -0.67123156233223402], [0.67735725373548905, -0.80218696515557997, 0.24558589309482759, 0.71513701919198991, 0.45828992999210616]]]])
1957            yy=numpy.array([[[[-0.27804018142491471, 0.36180484018167336, 0.12145955423622823, -0.058638880198430332, -0.2415810919700232], [0.80206223139070665, -0.80114243832302567, 0.12579584029021951, 0.84290921604168445, 0.36198456226974352], [-0.077821286173482607, 0.63169296721089974, 0.63961432371199778, -0.94669784291806547, 0.86845553790890673]], [[0.55062554053794766, 0.41829411101820146, 0.72194591062390057, -0.49073638409867626, -0.51703892081557168], [0.46804111316663599, -0.16315126301676774, 0.66489684588771136, -0.13621033950092887, 0.82326948316892024], [-0.2029413925377066, 0.71274901136999635, 0.89825758596046712, 0.28463143253245993, -0.63251028666113318]], [[0.18602282622682909, 0.13280609709962343, -0.12558451098229395, 0.32626952761422534, 0.41982564580036752], [-0.37047337414350778, -0.37456591101043846, -0.55035972276585521, 0.43107391095930891, -0.28404573178832671], [-0.38126872653150712, 0.14296475143005916, -0.34838026727138538, -0.97445650582683863, -0.64399060415561382]], [[0.71973031037968371, 0.56529646631655028, 0.69380006895880975, 0.18653853289686562, 0.25110271341702717], [0.10477639973772535, -0.32243537123856059, 0.13054262534885486, -0.46387424148680667, 0.54409978556648797], [0.55897897253207041, -0.58970222567809638, 0.43771606594400758, 0.12727547897940839, -0.62679369227370807]], [[0.76869842426958757, 0.76092312509284166, -0.71835375248952649, -0.93449634698124617, 0.22545701136931262], [0.50595049506190715, -0.47446429210266605, 0.12712923811011856, 0.00037428353105783962, 0.49141831042202733], [0.59312703532638467, 0.92046700230861433, 0.68548712357253305, -0.83950319510364779, 0.43736720710027965]]], [[[-0.70648687544256794, 0.98302171163755636, -0.13193932238878525, -0.13565671218322506, -0.80570127509324796], [-0.75812755199369963, -0.23515643336134895, 0.20202060106961239, 0.30523926900120446, 0.24584176126586743], [0.77145928594820101, 0.73916497027823214, 0.91448533120592512, 0.42628835141193711, 0.072765266996794198]], [[-0.25665699262514807, 0.55136447008588307, 0.54279636686865529, -0.23657065830091928, -0.75532362969220612], [-0.32752453387906111, 0.78462227411573382, 0.7107822521429894, -0.011376631424210526, -0.37776236563332821], [-0.81459678695910132, -0.786913896055214, -0.28545116962796935, 0.71786244633205687, 0.75857371930155826]], [[-0.13786968030871827, 0.29256506336158128, 0.38316553121287478, 0.52526716451674127, -0.64868219438582808], [-0.81740357855097301, 0.4454734019141906, -0.35680502824945814, -0.64052359954257132, 0.65330045479527099], [-0.45365494082269353, 0.86761729304587143, 0.132596405158522, -0.79528925457640254, -0.59732523899374468]], [[0.098686537860092516, -0.84452388411344503, 0.16894654194730685, -0.26382349754166889, -0.29329996233036448], [0.55996454146657104, 0.68883435457037967, 0.51352550102336947, -0.77579541336380675, -0.026589996138876026], [0.76017148334459739, 0.0088681127272538518, -0.99959550724394508, -0.15994493175955071, -0.2885698234913201]], [[0.35447377702162286, -0.083074507135266984, 0.96531388718212074, -0.72062432382226249, 0.65835534240626159], [-0.23840019287150294, 0.68232591655156782, 0.026162362373801207, -0.97881786740057186, 0.19114197142514566], [-0.18510580955429856, 0.67586054387826766, 0.32734711335751587, 0.51420051057181326, 0.77643044916815129]]], [[[-0.76241990420602535, 0.0080299250583750759, -0.37769200767133815, 0.64090118633045678, -0.62290496966004394], [0.20516013581775217, 0.85395172646396533, -0.19729305269372532, 0.44660857821110511, 0.067108100717937713], [-0.90755694205664406, 0.85578610757780216, -0.12182556563759195, -0.50601861168143714, -0.25427671529572371]], [[0.96192758871941519, -0.61163513897972366, -0.85196926926430572, 0.070171894890030728, 0.89912005091452363], [0.15121884007394093, -0.16123322681793129, 0.78102507090407181, -0.34647767416522424, -0.61304715688242051], [-0.62197767437900486, 0.07677291345591275, 0.83092703085615449, 0.51517060102506473, -0.98605964641707788]], [[-0.55776931670960384, 0.85290484273272593, 0.84266867850065519, -0.69579994189622663, -0.46952477701803552], [-0.75235182886433982, 0.20026277318372832, 0.27705056034261322, 0.68602495769438243, -0.80429647073986366], [0.53533484589916291, -0.042107789093957848, -0.15849500290517993, 0.33746144620270657, 0.24125023135017343]], [[-0.90151707832746752, 0.40373860001606743, -0.56372833595621352, -0.40908939402764921, 0.27833804807784746], [-0.040610727528486601, -0.17968235545157207, 0.52230304298915065, -0.65062680844170684, 0.88205671748800851], [0.41250735204951638, -0.222021026293026, 0.55491955225239176, 0.90536745338789415, 0.18261880198973324]], [[0.59658954830142541, 0.91133779899871592, 0.083360524878421938, 0.8059904951374568, -0.67526418629698592], [-0.99707224226622504, 0.98988442432413803, -0.85782477669449131, 0.54865362189600297, 0.65254937312334227], [0.28235588196314887, 0.63821279831191324, 0.82515061786684618, -0.52625129487442956, -0.80858034877876039]]], [[[-0.79900312916309191, -0.6969552303166151, -0.010129392598755116, 0.90842831515697209, 0.45487801097126024], [-0.095370914353942737, 0.71223451032888119, 0.80899520226509392, -0.099095997905264799, -0.41282303277357157], [0.67624169817747504, 0.45620571203051563, -0.022719630471966568, 0.46009794998584486, 0.12072841010340185]], [[0.34494958627303896, -0.67855067573955452, 0.82795800811679388, -0.48519232045009342, 0.20712983701127308], [0.85152059656549395, 0.072830412357481444, 0.3251282830345863, 0.042308518269010387, 0.39529836864529355], [0.96705429842110835, -0.53280165453089801, 0.39743544312527201, -0.21882334134665493, 0.42378426367693889]], [[-0.51178574534516463, 0.29644209006768518, 0.58901007368784986, 0.68701651083898341, 0.00054082359315898998], [0.40485465555185574, -0.3643218825320067, -0.25321202100952456, 0.8225095676318781, -0.26672320135938232], [0.55141664143615965, 0.44324748140882719, 0.016026696003152985, -0.66424442985309229, 0.43989744414074461]], [[0.93048033123889007, -0.33420492211830855, 0.28104341884457162, 0.21764264163651381, -0.83932611812347813], [-0.80392314873757575, 0.14309348351696927, -0.12580838743710698, 0.37487870499480769, -0.40042728079190004], [-0.78551470679037805, -0.15082104537394825, 0.96367377063824655, 0.79227473737715304, -0.69752977462621568]], [[-0.46250802355207377, 0.73017346446057152, -0.73351555169468363, -0.092144755500874975, -0.92515099751600816], [-0.078289980511300428, -0.83206364369303709, 0.47200222481875276, 0.31632949741105043, -0.37030803056003414], [-0.78045581894589411, 0.96042871024438936, -0.58026741143847094, 0.78524048007636238, -0.73991078098098106]]], [[[-0.90758476397748411, 0.94629670167770574, -0.27913377758262725, 0.082385001339218444, -0.25400030467320778], [0.5663993118879378, 0.77807003240113737, -0.3891884247044759, 0.64359742855498125, -0.92339692718870747], [-0.43816731769748452, -0.85334612609736471, 0.11908233153936365, 0.86204069140669803, 0.56722780428206931]], [[0.49703108584932743, 0.35837876509154265, 0.8936226767905604, -0.94181910103784805, 0.83585976714653576], [0.76558180801183129, 0.46605866533578499, -0.28888480897022095, -0.88537955153259595, -0.12368768541287967], [-0.37191223220868008, -0.38375832805673982, -0.16792886030531284, 0.72075759664845496, 0.40115442195235151]], [[-0.8648629694403025, -0.41847168110881738, 0.40561361869036849, -0.92321483992043163, -0.15124595154594078], [-0.35661448861403522, 0.93918381665328443, -0.21696849112390226, -0.30104567764971657, -0.09006946292530027], [0.99353314438301732, 0.56554429889370361, 0.17966504460474964, -0.094187954813818475, -0.81429589248631085]], [[-0.84183326116139168, -0.42795368356472485, 0.45955811485825437, -0.012302520501459746, 0.97853926109674649], [0.9775656968608728, 0.83095196842269203, -0.76241695641665008, -0.25372388534846557, 0.53920362985721115], [-0.86767560920188891, 0.52023262624535804, -0.38936669608937202, -0.74560869680213493, -0.33288325634222904]], [[-0.59549292169069346, 0.14937492284653708, 0.33964973252963104, -0.41925821233585747, -0.11131034876606605], [0.62697709270045454, -0.17036907228476661, 0.56762745809373083, 0.60054107169880222, -0.058981508765843849], [-0.7946165700273029, 0.75566034575629448, 0.97143532687321388, 0.26407594832112413, 0.47163537284333046]]], [[[-0.73392395388006393, 0.88733806824129591, -0.93903452523540598, -0.17260643195925796, -0.49263876407030982], [0.12927524239638588, -0.14708405308944128, 0.7790130749592461, -0.86464268019573254, 0.49651062741923013], [0.054727597993463606, -0.17889506183014814, 0.92610464121075253, 0.59249090793085823, -0.27561279538491834]], [[0.67850880548973547, 0.1968997207039076, -0.96119555976592164, 0.66937357752135007, -0.0052646712628421355], [-0.55625096860514534, -0.24128816701734057, 0.10091156445170002, -0.73961332576506567, 0.75734111251085645], [-0.77312249769381358, 0.1745475145398192, -0.96047372517098961, 0.74286361125740163, -0.89840599144130895]], [[0.5835330322915826, 0.97588074779952882, 0.017383080870907675, -0.9466085854749442, 0.63035419191830311], [-0.26993036648864566, 0.54870489052519966, -0.66781942889043688, -0.15969004818050792, -0.35422147627763723], [-0.46808318388882419, 0.50446516096748817, 0.6428366954841116, -0.208895426647975, -0.16321032110973799]], [[0.19906764291086509, 0.056257275648006422, -0.51448383622234717, -0.90021814902224717, -0.0075744199274057067], [0.35717785297678883, -0.44718222794803975, 0.029198842235905076, 0.60956930183562896, 0.1869607033485452], [-0.56416241757016117, 0.64868665962081873, -0.070870502032022831, -0.98783305244050079, 0.52181619256161782]], [[-0.55979532670446175, -0.63596348647944656, 0.9930793373234077, -0.76868163002783407, 0.21735772301348555], [-0.44578420958247955, -0.98982471271158623, -0.26865309340493537, 0.64041571479815662, 0.72591608900144089], [0.74122550610009186, -0.65051229626701579, -0.24002733581747737, -0.74166664707477659, 0.81680491554284096]]]])
1958            ref=inner(xx,yy)
1959            res=Evaluator(z)(x=xx,y=yy)
1960            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1961
1962        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1963        def test_outer_Symbol_rank0_and_0(self):
1964            sh0=()
1965            sh1=()
1966            x=Symbol('x', sh0)
1967            y=Symbol('y', sh1)
1968            z=outer(x,y)
1969            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1970            xx=numpy.array(0.167188688359)
1971            yy=numpy.array(0.541130826712)
1972          ref=outer(xx,yy)          ref=outer(xx,yy)
1973          res=Evaluator(z)(x=xx, y=yy)          res=Evaluator(z)(x=xx,y=yy)
1974          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1975      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1976      def test_clip_Symbol(self):      def test_outer_Symbol_rank0_and_1(self):
1977          x=Symbol('x', (4,4))          sh0=()
1978          y=clip(x, 0.4, 0.6)          sh1=(2,)
1979            x=Symbol('x', sh0)
1980            y=Symbol('y', sh1)
1981            z=outer(x,y)
1982          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1983          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array(0.583761110107)
1984          ref=clip(xx, 0.4, 0.6)          yy=numpy.array([-0.081726251892444868, -0.86576912123498562])
1985          res=Evaluator(y)(x=xx)          ref=outer(xx,yy)
1986            res=Evaluator(z)(x=xx,y=yy)
1987          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
1988      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1989      def test_length_Symbol(self):      def test_outer_Symbol_rank0_and_2(self):
1990          x=Symbol('x', (4,4))          sh0=()
1991          y=length(x)          sh1=(2, 1)
1992            x=Symbol('x', sh0)
1993            y=Symbol('y', sh1)
1994            z=outer(x,y)
1995          self.assertTrue(isinstance(y, Symbol), "wrong type of result")          self.assertTrue(isinstance(y, Symbol), "wrong type of result")
1996          xx=RandomData((4,4), FunctionSpace())          xx=numpy.array(0.0651672402893)
1997          ref=length(xx)          yy=numpy.array([[-0.42910680226375053], [0.10134889369184163]])
1998          res=Evaluator(y)(x=xx)          ref=outer(xx,yy)
1999            res=Evaluator(z)(x=xx,y=yy)
2000          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
2001      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2002      def test_maximum_Symbol(self):      def test_outer_Symbol_rank0_and_3(self):
2003          x,y=symbols('x,y', shape=(4,4))          sh0=()
2004            sh1=(1, 3, 2)
2005            x=Symbol('x', sh0)
2006            y=Symbol('y', sh1)
2007            z=outer(x,y)
2008            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
2009            xx=numpy.array(0.102417413265)
2010            yy=numpy.array([[[0.77683635416821062, 0.7923296744504511], [0.94239916059659956, 0.02618872761314095], [-0.43488788930038091, -0.41922470935924627]]])
2011            ref=outer(xx,yy)
2012            res=Evaluator(z)(x=xx,y=yy)
2013            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
2014        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2015        def test_outer_Symbol_rank0_and_4(self):
2016            sh0=()
2017            sh1=(1, 3, 2, 3)
2018            x=Symbol('x', sh0)
2019            y=Symbol('y', sh1)
2020            z=outer(x,y)
2021            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
2022            xx=numpy.array(0.652945948251)
2023            yy=numpy.array([[[[0.62407973161616925, 0.27605922740918798, -0.16019539797700211], [0.44715896329373694, -0.36127561579998368, -0.40959491524683855]], [[0.19063878633681219, 0.315177645460051, -0.74640377416960657], [-0.14387168052369659, -0.53410512708609548, -0.64168965175728809]], [[0.70987212403911037, 0.93324253304599059, 0.60495540477622489], [0.88021114799978517, -0.16076850102750639, -0.062531020437505358]]]])
2024            ref=outer(xx,yy)
2025            res=Evaluator(z)(x=xx,y=yy)
2026            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
2027        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2028        def test_outer_Symbol_rank1_and_0(self):
2029            sh0=(2,)
2030            sh1=()
2031            x=Symbol('x', sh0)
2032            y=Symbol('y', sh1)
2033            z=outer(x,y)
2034            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
2035            xx=numpy.array([0.50271419107438864, -0.73042093317359269])
2036            yy=numpy.array(-0.887200881616)
2037            ref=outer(xx,yy)
2038            res=Evaluator(z)(x=xx,y=yy)
2039            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
2040        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2041        def test_outer_Symbol_rank1_and_1(self):
2042            sh0=(6,)
2043            sh1=(1,)
2044            x=Symbol('x', sh0)
2045            y=Symbol('y', sh1)
2046            z=outer(x,y)
2047            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
2048            xx=numpy.array([-0.71453545433562016, 0.7798058529124996, -0.17790308975209679, 0.85517380327295833, 0.16302526440267662, 0.99063872128919339])
2049            yy=numpy.array([-0.84931183564706592])
2050            ref=outer(xx,yy)
2051            res=Evaluator(z)(x=xx,y=yy)
2052            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
2053        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2054        def test_outer_Symbol_rank1_and_2(self):
2055            sh0=(2,)
2056            sh1=(5, 4)
2057            x=Symbol('x', sh0)
2058            y=Symbol('y', sh1)
2059            z=outer(x,y)
2060            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
2061            xx=numpy.array([0.89459596614704417, -0.7209113855681335])
2062            yy=numpy.array([[-0.74205510182941659, -0.91903553123349102, 0.028399942159339497, -0.89029332106595405], [0.23990745252991075, -0.016875723903685413, -0.12847503955448381, 0.41537813726380901], [0.93312486631309133, -0.11421689435542737, -0.19887369667072896, -0.71826991641381688], [0.40075486110417358, 0.14793371903183217, 0.91498757052046664, 0.35688487642123001], [-0.01122818216437671, -0.98825907386215883, -0.54521245320623346, 0.13165472949538004]])
2063            ref=outer(xx,yy)
2064            res=Evaluator(z)(x=xx,y=yy)
2065            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
2066        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2067        def test_outer_Symbol_rank1_and_3(self):
2068            sh0=(4,)
2069            sh1=(1, 3, 4)
2070            x=Symbol('x', sh0)
2071            y=Symbol('y', sh1)
2072            z=outer(x,y)
2073            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
2074            xx=numpy.array([-0.24435241427954657, -0.28795450710996628, -0.43600210864484201, -0.34971998375251445])
2075            yy=numpy.array([[[0.16337926828503524, -0.91582844237135252, 0.37807050759893346, 0.58279166146986006], [-0.5935807303342131, 0.6261048241094862, 0.45649983184921772, -0.19087036494031606], [0.0094124978519420921, -0.30551340491027834, -0.61394398704665076, 0.97237864597758472]]])
2076            ref=outer(xx,yy)
2077            res=Evaluator(z)(x=xx,y=yy)
2078            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
2079        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2080        def test_outer_Symbol_rank2_and_0(self):
2081            sh0=(3, 5)
2082            sh1=()
2083            x=Symbol('x', sh0)
2084            y=Symbol('y', sh1)
2085            z=outer(x,y)
2086            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
2087            xx=numpy.array([[0.37598881847713783, 0.66926618965771056, -0.79342006985849922, -0.0050953009940024607, 0.20336612867936443], [0.51443390546586598, -0.18019512028779072, -0.89629383762390602, 0.015147409839111114, 0.49669648679904066], [-0.049270873147616134, 0.23226275222893089, -0.30777449387152478, -0.50183441346318003, -0.33587606606118281]])
2088            yy=numpy.array(-0.535761100646)
2089            ref=outer(xx,yy)
2090            res=Evaluator(z)(x=xx,y=yy)
2091            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
2092        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2093        def test_outer_Symbol_rank2_and_1(self):
2094            sh0=(5, 4)
2095            sh1=(4,)
2096            x=Symbol('x', sh0)
2097            y=Symbol('y', sh1)
2098            z=outer(x,y)
2099            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
2100            xx=numpy.array([[0.6375625143992476, -0.59965366063900061, -0.01957811841131929, -0.6546401803242996], [-0.40129735918532083, -0.6305093652548226, -0.24437058420032987, 0.9121203698837137], [-0.6737028122058335, -0.76420725817544533, -0.43044398485133306, 0.62973606563039031], [-0.97179428409592328, 0.54573138300392032, 0.85623885739959293, -0.65417003166069332], [0.90897868054166797, -0.31202017034538909, 0.29017479941481295, -0.69963079938701744]])
2101            yy=numpy.array([-0.65107107447378265, 0.61374981260691874, -0.65861538901476524, -0.18177873114347132])
2102            ref=outer(xx,yy)
2103            res=Evaluator(z)(x=xx,y=yy)
2104            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
2105        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2106        def test_outer_Symbol_rank2_and_2(self):
2107            sh0=(3, 4)
2108            sh1=(3, 1)
2109            x=Symbol('x', sh0)
2110            y=Symbol('y', sh1)
2111            z=outer(x,y)
2112            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
2113            xx=numpy.array([[0.81427811642077352, -0.76958207106106036, -0.22696542670418118, 0.33913425870104397], [-0.51619259267690487, -0.44735311916146925, -0.2846062897143804, 0.30742784073245333], [0.53939679963606757, 0.50339714279427361, -0.56941223018252596, 0.59962083536235244]])
2114            yy=numpy.array([[-0.86717548355102592], [0.27479532240681315], [-0.07243778068362472]])
2115            ref=outer(xx,yy)
2116            res=Evaluator(z)(x=xx,y=yy)
2117            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
2118        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2119        def test_outer_Symbol_rank3_and_0(self):
2120            sh0=(4, 3, 2)
2121            sh1=()
2122            x=Symbol('x', sh0)
2123            y=Symbol('y', sh1)
2124            z=outer(x,y)
2125            self.assertTrue(isinstance(y, Symbol), "wrong type of result")
2126            xx=numpy.array([[[-0.32007715632379763, 0.5974485887888854], [-0.83591735138525181, 0.29326813541685182], [-0.78748434685974011, -0.050309262220335826]], [[-0.708036847982771, 0.54878661631688153], [-0.2126055453245308, 0.20637554234060129], [-0.96321420626107157, -0.1498209588460031]], [[-0.95780303585763371, 0.58061602371401544], [0.54986686057743239, -0.89896686669810433], [0.8822663089106495, -0.88735003391486944]], [[0.897197201830638, -0.59807765112646893], [0.45725582791141983, 0.13278707514669508], [0.8961607849074098, 0.72615076110438759]]])
2127            yy=numpy.array(0.472399990783)
2128            ref=outer(xx,yy)
2129            res=Evaluator(z)(x=xx,y=yy)
2130            self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
2131        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2132        def test_outer_Symbol_rank3_and_1(self):
2133            sh0=(1, 3, 2)
2134            sh1=(4,)
2135            x=Symbol('x', sh0)