On 04/04/2011 01:49 PM, Alex Ter-Sarkissov wrote: > I have 2 variables, say var1=10,var2=100. To divide I do either > divide(float(var1),float(var2)) or simply float(var1)/float(var2). I'm > just wondering if there's a smarter way of doing this?
>>> from __future__ import division >>> var1 = 10 >>> var2 = 100 >>> print var1/var2 0.1 HTH, Pearu _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion