On Sat, Aug 20, 2011 at 4:49 PM, Chris Withers <[email protected]>wrote:
> On 20/08/2011 15:38, Robert Kern wrote: > > On Sat, Aug 20, 2011 at 17:37, Chris Withers<[email protected]> > wrote: > >> Hi All, > >> > >> What's the best type of array to use for decimal values? > >> (ie: where I care about precision and want to avoid any possible > >> rounding errors) > > > > dtype=object > > Thanks! > > What are the performance implications, if any, of this array type? > > It will be slower, the effect depends on how much data/computation you have. You need to look into using the decimal objects in decimal module<http://docs.python.org/library/decimal.html>, i.e., import decimal. Note that 1/7 still isn't going to be exact in decimals. Chuck
_______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
