[Numpy-discussion] Epsilon for each dtype

Matthieu Brucher matthieu.brucher at gmail.com
Mon Dec 10 06:50:13 EST 2007


Excellent, that was what I was looking for, thank you.

Matthieu

2007/12/10, Fabrice Silva <silva at lma.cnrs-mrs.fr>:
>
> Le lundi 10 décembre 2007 à 11:38 +0100, Matthieu Brucher a écrit :
> > Hi,
> > Is there somewhere a equivalent to std::numerical_limits<>::epsilon,
> > that is, the greatest value such that 1. + epsilon is numerically
> > equal to 1. ?
> > I saw something that could be related in oldnumeric, but nothing in
> > numpy itself.
>
> if X is a numpy object:
> numpy.finfo(type(X)).eps gives the epsilon of the type of X.
> You may look at other attributes of finfo too..
>
> --
> Fabrice Silva <silva at lma.cnrs-mrs.fr>
> LMA UPR CNRS 7051
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>



-- 
French PhD student
Website : http://matthieu-brucher.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn : http://www.linkedin.com/in/matthieubrucher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20071210/97ba5042/attachment.html>


More information about the NumPy-Discussion mailing list