/[escript]/trunk/escriptcore/test/python/test_util_binary_new.py
ViewVC logotype

Contents of /trunk/escriptcore/test/python/test_util_binary_new.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6470 - (show annotations)
Wed Jan 18 05:37:05 2017 UTC (2 years, 3 months ago) by jfenwick
File MIME type: text/x-python
File size: 2035 byte(s)
Initial tests binary operation

1
2 ##############################################################################
3 #
4 # Copyright (c) 2003-2016 by The University of Queensland
5 # http://www.uq.edu.au
6 #
7 # Primary Business: Queensland, Australia
8 # Licensed under the Apache License, version 2.0
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 # Development 2012-2013 by School of Earth Sciences
13 # Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 #
15 ##############################################################################
16
17 from __future__ import print_function, division
18
19 __copyright__="""Copyright (c) 2003-2016 by The University of Queensland
20 http://www.uq.edu.au
21 Primary Business: Queensland, Australia"""
22 __license__="""Licensed under the Apache License, version 2.0
23 http://www.apache.org/licenses/LICENSE-2.0"""
24 __url__="https://launchpad.net/escript-finley"
25
26 """
27 test for non-overloaded binary operations
28
29 :remark: use see `test_util`
30 :var __author__: name of author
31 :var __copyright__: copyrights
32 :var __license__: licence agreement
33 :var __url__: url entry point on documentation
34 :var __version__: version
35 :var __date__: date of the version
36 """
37
38 __author__="Joel Fenwick, joelfenwick@uq.edu.au"
39
40 import esys.escriptcore.utestselect as unittest
41 import numpy
42 from esys.escript import *
43 from test_util_base import Test_util_values
44
45 class Test_util_binary_new(Test_util_values):
46 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
47 def test_inner_combined(self):
48 opstring='inner(a,b)'
49 misccheck=None # How to work out what the result of type should be
50 oraclecheck="numpy.tensordot(refa, refb, axes=getRank(refa))"
51 opname="inner"
52 noshapemismatch=True
53 permitscalarmismatch=False
54 self.generate_binary_operation_test_batch_large(opstring, misccheck, oraclecheck, opname, no_shape_mismatch=noshapemismatch, permit_scalar_mismatch=permitscalarmismatch)
55
56
57
58

  ViewVC Help
Powered by ViewVC 1.1.26