def GenerateBinomialTable(m):
 table = numpy.zeros(((m + 1), (m + 1)), dtype=numpy.float64)
 for i in range((m + 1)):
  table[(i, 0)] = 1
 for i in range(1, (m + 1)):
  for j in range(1, (m + 1)):
   v = (table[((i - 1), j)] + table[((i - 1), (j - 1))])
   assert ((not math.isnan(v)) and (not math.isinf(v)))
   table[(i, j)] = v
 return tf.convert_to_tensor(table)

def GenerateBinomialTable ( m ) : table = numpy . zeros ( ( ( m + 1 ) , ( m + 1 ) ) , dtype = numpy . float64 ) for i in range ( ( m + 1 ) ) : table [ ( i , 0 ) ] = 1 for i in range ( 1 , ( m + 1 ) ) : for j in range ( 1 , ( m + 1 ) ) : v = ( table [ ( ( i - 1 ) , j ) ] + table [ ( ( i - 1 ) , ( j - 1 ) ) ] ) assert ( ( not math . isnan ( v ) ) and ( not math . isinf ( v ) ) ) table [ ( i , j ) ] = v return tf . convert_to_tensor ( table )
generate binomial table .