Nicely done. Alan G Isaac wrote: > On 12/18/2009 7:12 PM, Wayne Watson wrote: > >> The point of the scalar product is to produce theta. >> > > As David said, that is just NumPy's `dot`. > > >>>> a = np.array([0,2]) >>>> b = np.array([5,0]) >>>> theta = np.arccos(np.dot(a,b)/np.sqrt(np.dot(a,a)*np.dot(b,b))) >>>> theta >>>> > 1.5707963267948966 > >>>> theta/np.pi >>>> > 0.5 > > hth, > Alan Isaac > > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > http://mail.scipy.org/mailman/listinfo/numpy-discussion > >
-- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet "... humans'innate skills with numbers isn't much better than that of rats and dolphins." -- Stanislas Dehaene, neurosurgeon Web Page: <www.speckledwithstars.net/> _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion