From: Gary P. <gar...@gm...> - 2008-03-30 21:04:52
|
On Sun, Mar 30, 2008 at 4:42 PM, <bre...@un...> wrote: > > scipy.linspace does the same job as arange, but behaves correctly in all > circumstances Brief detail: scipy.linspace points to the same function as numpy.linspace, and numpy has less overhead than scipy. Also, the syntax of linspace is not the same as the syntax of arange. (While I'm at it, for those familiar with matplotlib, pylab.linspace behaves differently than numpy.linspace, unfortunately.) > > > > > > "Gary Pajer" <gar...@gm...> > Sent by: vis...@li... > > 31/03/2008 06:40 AM > > To > "Joe Heafner" <hea...@gm...> > > cc VPython List <vis...@li...> > > Subject Re: [Visualpython-users] can't understand arange() behavior > > > > > > > In [1]: 3 * 0.1 > Out[1]: 0.30000000000000004 > > I.e., 3 * 0.1 > 0.3 > > The floating point gotcha, yet again. > > -g > > On Sat, Mar 29, 2008 at 11:13 PM, Joe Heafner <hea...@gm...> wrote: > > When I type arange(1, 3, 1) I get [1, 2] as expected. When I type > > arange(0.1, 0.3, 0.1) I get [0.1, 0.2] as expected. But when I type > > arange(0.1, 3*0.1, 0.1) I get [0.1, 0.2, 0.3], which is not what would > > expect. I can't find this behavior documented anywhere. What's going on? > > > > Joe > > ------------------------------------------------------------------------- > > Check out the new SourceForge.net Marketplace. > > It's the best place to buy or sell services for > > just about anything Open Source. > > > > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > > _______________________________________________ > > Visualpython-users mailing list > > Vis...@li... > > https://lists.sourceforge.net/lists/listinfo/visualpython-users > > > > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ > > > UNITED GROUP > This email message is the property of United Group. The information in this > email is confidential and may be legally privileged. It is intended solely > for the addressee. Access to this email by anyone else is unauthorised. If > you are not the intended recipient, you may not disclose, copy or distribute > this email, nor take or omit to take any action in reliance on it. United > Group accepts no liability for any damage caused by this email or any > attachments due to viruses, interference, interception, corruption or > unauthorised access. > If you have received this email in error, please notify United Group > immediately by email to the sender's email address and delete this document. > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > > |