diff options
Diffstat (limited to 'numpy/f2py/f90mod_rules.py')
-rw-r--r-- | numpy/f2py/f90mod_rules.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/numpy/f2py/f90mod_rules.py b/numpy/f2py/f90mod_rules.py index 85eae8047..122fa8939 100644 --- a/numpy/f2py/f90mod_rules.py +++ b/numpy/f2py/f90mod_rules.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Build F90 module support for f2py2e. @@ -13,8 +13,6 @@ $Date: 2005/02/03 19:30:23 $ Pearu Peterson """ -from __future__ import division, absolute_import, print_function - __version__ = "$Revision: 1.27 $"[10:-1] f2py_version = 'See `f2py -v`' @@ -25,7 +23,7 @@ from . import capi_maps from . import func2subr from .crackfortran import undo_rmbadname, undo_rmbadname1 -# The eviroment provided by auxfuncs.py is needed for some calls to eval. +# The environment provided by auxfuncs.py is needed for some calls to eval. # As the needed functions cannot be determined by static inspection of the # code, it is safest to use import * pending a major refactoring of f2py. from .auxfuncs import * @@ -87,7 +85,6 @@ fgetdims2_sa = """\ def buildhooks(pymod): - global fgetdims1, fgetdims2 from . import rules ret = {'f90modhooks': [], 'initf90modhooks': [], 'body': [], 'need': ['F_FUNC', 'arrayobject.h'], @@ -180,7 +177,7 @@ def buildhooks(pymod): (m['name'], undo_rmbadname1(n))) fadd('integer flag\n') fhooks[0] = fhooks[0] + fgetdims1 - dms = eval('range(1,%s+1)' % (dm['rank'])) + dms = range(1, int(dm['rank']) + 1) fadd(' allocate(d(%s))\n' % (','.join(['s(%s)' % i for i in dms]))) fhooks[0] = fhooks[0] + use_fgetdims2 |