[SciPy-dev] numpy.float128 absence yield bugs

Matthieu Brucher matthieu.brucher at gmail.com
Mon Mar 10 08:49:18 EDT 2008


2008/3/10, dmitrey <dmitrey.kroshko at scipy.org>:
>
> hi all,
> if numpy.float128 type is absent (BTW does it related to OS or something
> else?), it yields bugs even if the type is never used (while importing
> from a py-file). For example:
>
> from numpy import ..., float64, float128
> if (some_cond):
>     <use float128>
> else: <use float64>


If you do not need a direct call to float128 in your condition, you can
easily make it compatible on all platforms.
Do not import numpy with "from numpy import ...", but only "import numpy",
make your decision based on cond and the presence of float128 ('float128' in
dir(numpy)) and everything will be fine ;)

Matthieu
-- 
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/scipy-dev/attachments/20080310/eb101216/attachment.html>


More information about the SciPy-Dev mailing list