diff options
author | Ian Thomas <ianthomas23@gmail.com> | 2020-11-05 10:31:09 +0000 |
---|---|---|
committer | Ian Thomas <ianthomas23@gmail.com> | 2020-11-05 10:31:09 +0000 |
commit | f9dc6c2517e0f16c59add724b12fd5632ecc0642 (patch) | |
tree | 9fd9443649374019def05e7d0a554759d1c1436a /numpy/f2py | |
parent | 93d3e7c247b66ec54d1095df30e99a95b4af9c72 (diff) | |
download | numpy-f9dc6c2517e0f16c59add724b12fd5632ecc0642.tar.gz |
Revert PR gh-17654 which failed to fix issue gh-8062.
See also PR gh-17687.
Diffstat (limited to 'numpy/f2py')
-rwxr-xr-x | numpy/f2py/crackfortran.py | 9 | ||||
-rw-r--r-- | numpy/f2py/tests/test_crackfortran.py | 22 |
2 files changed, 0 insertions, 31 deletions
diff --git a/numpy/f2py/crackfortran.py b/numpy/f2py/crackfortran.py index 6ff30560d..2e95e4596 100755 --- a/numpy/f2py/crackfortran.py +++ b/numpy/f2py/crackfortran.py @@ -2177,15 +2177,6 @@ def getlincoef(e, xset): # e = a*x+b ; x in xset m1 = re_1.match(ee) c2 = myeval(ee, {}, {}) if (a * 0.5 + b == c and a * 1.5 + b == c2): - # gh-8062: return integers instead of floats if possible. - try: - a = int(a) - except: - pass - try: - b = int(b) - except: - pass return a, b, x except Exception: pass diff --git a/numpy/f2py/tests/test_crackfortran.py b/numpy/f2py/tests/test_crackfortran.py index 96adffc72..735804024 100644 --- a/numpy/f2py/tests/test_crackfortran.py +++ b/numpy/f2py/tests/test_crackfortran.py @@ -86,25 +86,3 @@ class TestPublicPrivate(): assert 'public' not in mod['vars']['a']['attrspec'] assert 'private' not in mod['vars']['seta']['attrspec'] assert 'public' in mod['vars']['seta']['attrspec'] - - -class TestArrayDimCalculation(util.F2PyTest): - # Issue gh-8062. Calculations that occur in the dimensions of fortran - # array declarations should be interpreted by f2py as integers not floats. - # Prior to fix, test fails as generated fortran wrapper does not compile. - code = """ - function test(n, a) - integer, intent(in) :: n - real(8), intent(out) :: a(0:2*n/2) - integer :: test - a(:) = n - test = 1 - endfunction - """ - - def test_issue_8062(self): - for n in (5, 11): - _, a = self.module.test(n) - assert(a.shape == (n+1,)) - assert_array_equal(a, n) - |