python - Extracting result from integration (quadrature)? -
consider python snippet:
>>> v=quad(lambda x:sin(x),0,.456) >>> print "v=",v; 3*v<br> v= (0.10217888319247767, 1.1344134875077312e-15) (0.10217888319247767, 1.1344134875077312e-15, 0.10217888319247767, 1.1344134875077312e-15, 0.10217888319247767, 1.1344134875077312e-15)<br>>>>
how v equal 0.10217888319247767, (e.g.) 3*v=.30653664957743301 (i.e., “de-tuple” it)?
you can index tuple this: 3*v[0]
Comments
Post a Comment