File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,16 +49,15 @@ def f2(x):
4949p = model .probdist ()
5050for j in range (len (model .samplespace )):
5151 x = model .samplespace [j ]
52- print (( "\t x = %-15s" % (x + ":" ,) + " p(x) = " + str (p [j ])). encode ( 'utf-8' ))
52+ print ("\t x = %-15s" % (x + ":" ,) + " p(x) = " + str (p [j ]))
5353
5454
5555# Now show how well the constraints are satisfied:
5656print ()
5757print ("Desired constraints:" )
5858print ("\t p['dans'] + p['en'] = 0.3" )
59- print (( "\t p['dans'] + p['" + a_grave + "'] = 0.5" ). encode ( 'utf-8' ) )
59+ print ("\t p['dans'] + p['" + a_grave + "'] = 0.5" )
6060print ()
6161print ("Actual expectations under the fitted model:" )
6262print ("\t p['dans'] + p['en'] =" , p [0 ] + p [1 ])
63- print (("\t p['dans'] + p['" + a_grave + "'] = " + str (p [0 ]+ p [2 ])).encode ('utf-8' ))
64- # (Or substitute "x.encode('latin-1')" if you have a primitive terminal.)
63+ print ("\t p['dans'] + p['" + a_grave + "'] = " + str (p [0 ]+ p [2 ]))
You can’t perform that action at this time.
0 commit comments