diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2012-03-17 23:42:13 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2012-04-29 21:45:15 -0600 |
commit | e7f2210e10126e9d11074ccd75addb6506216540 (patch) | |
tree | 00cb91e86badafda5848bea7f9d65e5a05e0a141 | |
parent | 3e9aaeda5f914a34124f1ae4c617a9b40e396294 (diff) | |
download | numpy-e7f2210e10126e9d11074ccd75addb6506216540.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.
-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 eaeed5052..2b92b1b0f 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={}): |