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

Diff of /trunk/escriptcore/test/python/test_util_base.py

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

revision 6470 by jfenwick, Wed Jan 18 05:37:05 2017 UTC revision 6480 by jfenwick, Tue Jan 24 05:01:31 2017 UTC
# Line 1410  class Test_util_values(unittest.TestCase Line 1410  class Test_util_values(unittest.TestCase
1410    
1411    
1412    
1413      def generate_binary_operation_test_batch_large(self, opstring, misccheck, oraclecheck, opname, input_trans=None, minrank=0, maxrank=4, no_shape_mismatch=False, permit_scalar_mismatch=True):      def generate_binary_operation_test_batch_large(self, opstring, misccheck, oraclecheck, opname, input_trans=None, minrank=0, maxrank=4, no_shape_mismatch=False, permit_scalar_mismatch=True, cap_combined_rank=False):
1414          """          """
1415          Generates a set of tests for binary operations.          Generates a set of tests for binary operations.
1416          It is similar to the unary versions but with some unneeded options removed.          It is similar to the unary versions but with some unneeded options removed.
# Line 1465  class Test_util_values(unittest.TestCase Line 1465  class Test_util_values(unittest.TestCase
1465                  # now we have a complete set of possible args                      # now we have a complete set of possible args    
1466                  for aarg in aargset:                  for aarg in aargset:
1467                      for barg in bargset:                      for barg in bargset:
1468                            if cap_combined_rank and getRank(aarg[0][0])+getRank(barg[0][0])>4:
1469                                continue  #resulting object too big
1470                          if no_shape_mismatch:                          if no_shape_mismatch:
1471                              sa=getShape(aarg[0][0])                              sa=getShape(aarg[0][0])
1472                              sb=getShape(barg[0][0])                              sb=getShape(barg[0][0])
1473                              if sa!=sb:                              if sa!=sb:
1474                                  if not permit_scalar_mismatch or (sa!=() and rb!=()):                                  if not permit_scalar_mismatch or (sa!=() and sb!=()):
1475                                     continue                                     continue
1476                          p=(aarg[0][0], barg[0][0], opstring, misccheck,                          p=(aarg[0][0], barg[0][0], opstring, misccheck,
1477                             numpy.array(aarg[0][1]), numpy.array(barg[0][1]),                             numpy.array(aarg[0][1]), numpy.array(barg[0][1]),

Legend:
Removed from v.6470  
changed lines
  Added in v.6480

  ViewVC Help
Powered by ViewVC 1.1.26