diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2012-03-17 23:42:13 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2012-03-17 23:42:13 -0600 |
commit | dc4fd6462ab6f59f69b20f0148adeb96646942f0 (patch) | |
tree | 1a6e0f1d763e9c4024a4aa27a65e764fec049a52 /numpy/f2py/crackfortran.py | |
parent | 32a4a7d282c4cdbbfdf09ff10345e05ccec58919 (diff) | |
download | numpy-dc4fd6462ab6f59f69b20f0148adeb96646942f0.tar.gz |
BUG: Fix f2py test_kind.py test.
Newer Fortran compilers for Intel may support quad precision, so
_selected_real_kind_func needs to report that for precisions >= 19.
Diffstat (limited to 'numpy/f2py/crackfortran.py')
-rwxr-xr-x | numpy/f2py/crackfortran.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/numpy/f2py/crackfortran.py b/numpy/f2py/crackfortran.py index d02b1f077..5d664e399 100755 --- a/numpy/f2py/crackfortran.py +++ b/numpy/f2py/crackfortran.py @@ -1977,16 +1977,19 @@ def _selected_int_kind_func(r): if m<=2**128: return 16 return -1 -def _selected_real_kind_func(p,r=0,radix=0): +def _selected_real_kind_func(p, r=0, radix=0): #XXX: This should be processor dependent - if p<7: return 4 - if p<16: return 8 + # This is only good for 0 <= p <= 20 + if p < 7: return 4 + if p < 16: return 8 if platform.machine().lower().startswith('power'): - if p<=20: + if p <= 20: return 16 else: - if p<19: + if p < 19: return 10 + elif p <= 20: + return 16 return -1 def get_parameters(vars, global_params={}): |