diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-02-27 13:26:58 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-03-01 11:22:47 -0700 |
commit | 6aa264c4bad9c89ccdd9ecd5a1cb5ef10643ec51 (patch) | |
tree | 15cad18dacf1ef03380c957ed9af4f39b94c5012 /numpy/f2py | |
parent | 3c13c0a925276130d66be490eed4ae337712cce2 (diff) | |
download | numpy-6aa264c4bad9c89ccdd9ecd5a1cb5ef10643ec51.tar.gz |
2to3: Put `from __future__ import division in every python file.
This should be harmless, as we already are division clean. However,
placement of this import takes some care. In the future a script
can be used to append new features without worry, at least until
such time as it exceeds a single line. Having that ability will
make it easier to deal with absolute imports and printing updates.
Diffstat (limited to 'numpy/f2py')
32 files changed, 189 insertions, 128 deletions
diff --git a/numpy/f2py/__init__.py b/numpy/f2py/__init__.py index 220cb3d87..12add2153 100644 --- a/numpy/f2py/__init__.py +++ b/numpy/f2py/__init__.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +from __future__ import division __all__ = ['run_main','compile','f2py_testing'] diff --git a/numpy/f2py/__version__.py b/numpy/f2py/__version__.py index 104c2e1a8..2f842c89d 100644 --- a/numpy/f2py/__version__.py +++ b/numpy/f2py/__version__.py @@ -1,3 +1,5 @@ +from __future__ import division + major = 2 try: diff --git a/numpy/f2py/auxfuncs.py b/numpy/f2py/auxfuncs.py index 72af373db..0f68953ad 100644 --- a/numpy/f2py/auxfuncs.py +++ b/numpy/f2py/auxfuncs.py @@ -12,7 +12,10 @@ terms of the NumPy (BSD style) LICENSE. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: 2005/07/24 19:01:55 $ Pearu Peterson + """ +from __future__ import division + __version__ = "$Revision: 1.65 $"[10:-1] import __version__ diff --git a/numpy/f2py/capi_maps.py b/numpy/f2py/capi_maps.py index 42d506d74..d82b2c3f5 100644 --- a/numpy/f2py/capi_maps.py +++ b/numpy/f2py/capi_maps.py @@ -9,7 +9,9 @@ terms of the NumPy License. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: 2005/05/06 10:57:33 $ Pearu Peterson + """ +from __future__ import division __version__ = "$Revision: 1.60 $"[10:-1] diff --git a/numpy/f2py/cb_rules.py b/numpy/f2py/cb_rules.py index 8e8320bfd..05404add2 100644 --- a/numpy/f2py/cb_rules.py +++ b/numpy/f2py/cb_rules.py @@ -11,7 +11,9 @@ terms of the NumPy License. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: 2005/07/20 11:27:58 $ Pearu Peterson + """ +from __future__ import division __version__ = "$Revision: 1.53 $"[10:-1] diff --git a/numpy/f2py/cfuncs.py b/numpy/f2py/cfuncs.py index 72ee4f7a4..ccadd94e3 100644 --- a/numpy/f2py/cfuncs.py +++ b/numpy/f2py/cfuncs.py @@ -12,7 +12,9 @@ terms of the NumPy License. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: 2005/05/06 11:42:34 $ Pearu Peterson + """ +from __future__ import division __version__ = "$Revision: 1.75 $"[10:-1] diff --git a/numpy/f2py/common_rules.py b/numpy/f2py/common_rules.py index 3295676ef..db7a6ee6d 100644 --- a/numpy/f2py/common_rules.py +++ b/numpy/f2py/common_rules.py @@ -11,7 +11,9 @@ terms of the NumPy License NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: 2005/05/06 10:57:33 $ Pearu Peterson + """ +from __future__ import division __version__ = "$Revision: 1.19 $"[10:-1] diff --git a/numpy/f2py/crackfortran.py b/numpy/f2py/crackfortran.py index f610548d6..1ac08d9a5 100755 --- a/numpy/f2py/crackfortran.py +++ b/numpy/f2py/crackfortran.py @@ -1,8 +1,134 @@ #!/usr/bin/env python """ +Usage of crackfortran: +====================== +Command line keys: -quiet,-verbose,-fix,-f77,-f90,-show,-h <pyffilename> + -m <module name for f77 routines>,--ignore-contains +Functions: crackfortran, crack2fortran +The following Fortran statements/constructions are supported +(or will be if needed): + block data,byte,call,character,common,complex,contains,data, + dimension,double complex,double precision,end,external,function, + implicit,integer,intent,interface,intrinsic, + logical,module,optional,parameter,private,public, + program,real,(sequence?),subroutine,type,use,virtual, + include,pythonmodule +Note: 'virtual' is mapped to 'dimension'. +Note: 'implicit integer (z) static (z)' is 'implicit static (z)' (this is minor bug). +Note: code after 'contains' will be ignored until its scope ends. +Note: 'common' statement is extended: dimensions are moved to variable definitions +Note: f2py directive: <commentchar>f2py<line> is read as <line> +Note: pythonmodule is introduced to represent Python module + +Usage: + `postlist=crackfortran(files,funcs)` + `postlist` contains declaration information read from the list of files `files`. + `crack2fortran(postlist)` returns a fortran code to be saved to pyf-file + + `postlist` has the following structure: + *** it is a list of dictionaries containing `blocks': + B = {'block','body','vars','parent_block'[,'name','prefix','args','result', + 'implicit','externals','interfaced','common','sortvars', + 'commonvars','note']} + B['block'] = 'interface' | 'function' | 'subroutine' | 'module' | + 'program' | 'block data' | 'type' | 'pythonmodule' + B['body'] --- list containing `subblocks' with the same structure as `blocks' + B['parent_block'] --- dictionary of a parent block: + C['body'][<index>]['parent_block'] is C + B['vars'] --- dictionary of variable definitions + B['sortvars'] --- dictionary of variable definitions sorted by dependence (independent first) + B['name'] --- name of the block (not if B['block']=='interface') + B['prefix'] --- prefix string (only if B['block']=='function') + B['args'] --- list of argument names if B['block']== 'function' | 'subroutine' + B['result'] --- name of the return value (only if B['block']=='function') + B['implicit'] --- dictionary {'a':<variable definition>,'b':...} | None + B['externals'] --- list of variables being external + B['interfaced'] --- list of variables being external and defined + B['common'] --- dictionary of common blocks (list of objects) + B['commonvars'] --- list of variables used in common blocks (dimensions are moved to variable definitions) + B['from'] --- string showing the 'parents' of the current block + B['use'] --- dictionary of modules used in current block: + {<modulename>:{['only':<0|1>],['map':{<local_name1>:<use_name1>,...}]}} + B['note'] --- list of LaTeX comments on the block + B['f2pyenhancements'] --- optional dictionary + {'threadsafe':'','fortranname':<name>, + 'callstatement':<C-expr>|<multi-line block>, + 'callprotoargument':<C-expr-list>, + 'usercode':<multi-line block>|<list of multi-line blocks>, + 'pymethoddef:<multi-line block>' + } + B['entry'] --- dictionary {entryname:argslist,..} + B['varnames'] --- list of variable names given in the order of reading the + Fortran code, useful for derived types. + B['saved_interface'] --- a string of scanned routine signature, defines explicit interface + *** Variable definition is a dictionary + D = B['vars'][<variable name>] = + {'typespec'[,'attrspec','kindselector','charselector','=','typename']} + D['typespec'] = 'byte' | 'character' | 'complex' | 'double complex' | + 'double precision' | 'integer' | 'logical' | 'real' | 'type' + D['attrspec'] --- list of attributes (e.g. 'dimension(<arrayspec>)', + 'external','intent(in|out|inout|hide|c|callback|cache|aligned4|aligned8|aligned16)', + 'optional','required', etc) + K = D['kindselector'] = {['*','kind']} (only if D['typespec'] = + 'complex' | 'integer' | 'logical' | 'real' ) + C = D['charselector'] = {['*','len','kind']} + (only if D['typespec']=='character') + D['='] --- initialization expression string + D['typename'] --- name of the type if D['typespec']=='type' + D['dimension'] --- list of dimension bounds + D['intent'] --- list of intent specifications + D['depend'] --- list of variable names on which current variable depends on + D['check'] --- list of C-expressions; if C-expr returns zero, exception is raised + D['note'] --- list of LaTeX comments on the variable + *** Meaning of kind/char selectors (few examples): + D['typespec>']*K['*'] + D['typespec'](kind=K['kind']) + character*C['*'] + character(len=C['len'],kind=C['kind']) + (see also fortran type declaration statement formats below) + +Fortran 90 type declaration statement format (F77 is subset of F90) +==================================================================== +(Main source: IBM XL Fortran 5.1 Language Reference Manual) +type declaration = <typespec> [[<attrspec>]::] <entitydecl> +<typespec> = byte | + character[<charselector>] | + complex[<kindselector>] | + double complex | + double precision | + integer[<kindselector>] | + logical[<kindselector>] | + real[<kindselector>] | + type(<typename>) +<charselector> = * <charlen> | + ([len=]<len>[,[kind=]<kind>]) | + (kind=<kind>[,len=<len>]) +<kindselector> = * <intlen> | + ([kind=]<kind>) +<attrspec> = comma separated list of attributes. + Only the following attributes are used in + building up the interface: + external + (parameter --- affects '=' key) + optional + intent + Other attributes are ignored. +<intentspec> = in | out | inout +<arrayspec> = comma separated list of dimension bounds. +<entitydecl> = <name> [[*<charlen>][(<arrayspec>)] | [(<arrayspec>)]*<charlen>] + [/<init_expr>/ | =<init_expr>] [,<entitydecl>] + +In addition, the following attributes are used: check,depend,note + +TODO: + * Apply 'parameter' attribute (e.g. 'integer parameter :: i=2' 'real x(i)' + -> 'real x(2)') + The above may be solved by creating appropriate preprocessor program, for example. + crackfortran --- read fortran (77,90) code and extract declaration information. Usage is explained in the comment block below. + Copyright 1999-2004 Pearu Peterson all rights reserved, Pearu Peterson <pearu@ioc.ee> Permission to use, modify, and distribute this software is given under the @@ -11,138 +137,15 @@ terms of the NumPy License. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: 2005/09/27 07:13:49 $ Pearu Peterson + """ +from __future__ import division + __version__ = "$Revision: 1.177 $"[10:-1] import platform import __version__ f2py_version = __version__.version -""" - Usage of crackfortran: - ====================== - Command line keys: -quiet,-verbose,-fix,-f77,-f90,-show,-h <pyffilename> - -m <module name for f77 routines>,--ignore-contains - Functions: crackfortran, crack2fortran - The following Fortran statements/constructions are supported - (or will be if needed): - block data,byte,call,character,common,complex,contains,data, - dimension,double complex,double precision,end,external,function, - implicit,integer,intent,interface,intrinsic, - logical,module,optional,parameter,private,public, - program,real,(sequence?),subroutine,type,use,virtual, - include,pythonmodule - Note: 'virtual' is mapped to 'dimension'. - Note: 'implicit integer (z) static (z)' is 'implicit static (z)' (this is minor bug). - Note: code after 'contains' will be ignored until its scope ends. - Note: 'common' statement is extended: dimensions are moved to variable definitions - Note: f2py directive: <commentchar>f2py<line> is read as <line> - Note: pythonmodule is introduced to represent Python module - - Usage: - `postlist=crackfortran(files,funcs)` - `postlist` contains declaration information read from the list of files `files`. - `crack2fortran(postlist)` returns a fortran code to be saved to pyf-file - - `postlist` has the following structure: - *** it is a list of dictionaries containing `blocks': - B = {'block','body','vars','parent_block'[,'name','prefix','args','result', - 'implicit','externals','interfaced','common','sortvars', - 'commonvars','note']} - B['block'] = 'interface' | 'function' | 'subroutine' | 'module' | - 'program' | 'block data' | 'type' | 'pythonmodule' - B['body'] --- list containing `subblocks' with the same structure as `blocks' - B['parent_block'] --- dictionary of a parent block: - C['body'][<index>]['parent_block'] is C - B['vars'] --- dictionary of variable definitions - B['sortvars'] --- dictionary of variable definitions sorted by dependence (independent first) - B['name'] --- name of the block (not if B['block']=='interface') - B['prefix'] --- prefix string (only if B['block']=='function') - B['args'] --- list of argument names if B['block']== 'function' | 'subroutine' - B['result'] --- name of the return value (only if B['block']=='function') - B['implicit'] --- dictionary {'a':<variable definition>,'b':...} | None - B['externals'] --- list of variables being external - B['interfaced'] --- list of variables being external and defined - B['common'] --- dictionary of common blocks (list of objects) - B['commonvars'] --- list of variables used in common blocks (dimensions are moved to variable definitions) - B['from'] --- string showing the 'parents' of the current block - B['use'] --- dictionary of modules used in current block: - {<modulename>:{['only':<0|1>],['map':{<local_name1>:<use_name1>,...}]}} - B['note'] --- list of LaTeX comments on the block - B['f2pyenhancements'] --- optional dictionary - {'threadsafe':'','fortranname':<name>, - 'callstatement':<C-expr>|<multi-line block>, - 'callprotoargument':<C-expr-list>, - 'usercode':<multi-line block>|<list of multi-line blocks>, - 'pymethoddef:<multi-line block>' - } - B['entry'] --- dictionary {entryname:argslist,..} - B['varnames'] --- list of variable names given in the order of reading the - Fortran code, useful for derived types. - B['saved_interface'] --- a string of scanned routine signature, defines explicit interface - *** Variable definition is a dictionary - D = B['vars'][<variable name>] = - {'typespec'[,'attrspec','kindselector','charselector','=','typename']} - D['typespec'] = 'byte' | 'character' | 'complex' | 'double complex' | - 'double precision' | 'integer' | 'logical' | 'real' | 'type' - D['attrspec'] --- list of attributes (e.g. 'dimension(<arrayspec>)', - 'external','intent(in|out|inout|hide|c|callback|cache|aligned4|aligned8|aligned16)', - 'optional','required', etc) - K = D['kindselector'] = {['*','kind']} (only if D['typespec'] = - 'complex' | 'integer' | 'logical' | 'real' ) - C = D['charselector'] = {['*','len','kind']} - (only if D['typespec']=='character') - D['='] --- initialization expression string - D['typename'] --- name of the type if D['typespec']=='type' - D['dimension'] --- list of dimension bounds - D['intent'] --- list of intent specifications - D['depend'] --- list of variable names on which current variable depends on - D['check'] --- list of C-expressions; if C-expr returns zero, exception is raised - D['note'] --- list of LaTeX comments on the variable - *** Meaning of kind/char selectors (few examples): - D['typespec>']*K['*'] - D['typespec'](kind=K['kind']) - character*C['*'] - character(len=C['len'],kind=C['kind']) - (see also fortran type declaration statement formats below) - - Fortran 90 type declaration statement format (F77 is subset of F90) -==================================================================== - (Main source: IBM XL Fortran 5.1 Language Reference Manual) - type declaration = <typespec> [[<attrspec>]::] <entitydecl> - <typespec> = byte | - character[<charselector>] | - complex[<kindselector>] | - double complex | - double precision | - integer[<kindselector>] | - logical[<kindselector>] | - real[<kindselector>] | - type(<typename>) - <charselector> = * <charlen> | - ([len=]<len>[,[kind=]<kind>]) | - (kind=<kind>[,len=<len>]) - <kindselector> = * <intlen> | - ([kind=]<kind>) - <attrspec> = comma separated list of attributes. - Only the following attributes are used in - building up the interface: - external - (parameter --- affects '=' key) - optional - intent - Other attributes are ignored. - <intentspec> = in | out | inout - <arrayspec> = comma separated list of dimension bounds. - <entitydecl> = <name> [[*<charlen>][(<arrayspec>)] | [(<arrayspec>)]*<charlen>] - [/<init_expr>/ | =<init_expr>] [,<entitydecl>] - - In addition, the following attributes are used: check,depend,note - - TODO: - * Apply 'parameter' attribute (e.g. 'integer parameter :: i=2' 'real x(i)' - -> 'real x(2)') - The above may be solved by creating appropriate preprocessor program, for example. -""" # import sys import string diff --git a/numpy/f2py/diagnose.py b/numpy/f2py/diagnose.py index 1a4f6adf7..e7759b6dd 100644 --- a/numpy/f2py/diagnose.py +++ b/numpy/f2py/diagnose.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +from __future__ import division import os import sys diff --git a/numpy/f2py/doc/collectinput.py b/numpy/f2py/doc/collectinput.py index 2e6c6c96b..5e98c8350 100755 --- a/numpy/f2py/doc/collectinput.py +++ b/numpy/f2py/doc/collectinput.py @@ -17,7 +17,9 @@ Usage: collectinput <infile> <outfile> collectinput <infile> # <outfile>=inputless_<infile> collectinput # in and out are stdin and stdout + """ +from __future__ import division __version__ = "0.0" diff --git a/numpy/f2py/docs/pytest.py b/numpy/f2py/docs/pytest.py index abd3487df..b49dc764a 100644 --- a/numpy/f2py/docs/pytest.py +++ b/numpy/f2py/docs/pytest.py @@ -1,3 +1,5 @@ +from __future__ import division + #File: pytest.py import Numeric def foo(a): diff --git a/numpy/f2py/docs/usersguide/setup_example.py b/numpy/f2py/docs/usersguide/setup_example.py index e5f5e8441..911dc3324 100644 --- a/numpy/f2py/docs/usersguide/setup_example.py +++ b/numpy/f2py/docs/usersguide/setup_example.py @@ -1,4 +1,6 @@ #!/usr/bin/env python +from __future__ import division + # File: setup_example.py from numpy_distutils.core import Extension diff --git a/numpy/f2py/f2py2e.py b/numpy/f2py/f2py2e.py index 7623ebf72..235fcb75a 100755 --- a/numpy/f2py/f2py2e.py +++ b/numpy/f2py/f2py2e.py @@ -12,7 +12,9 @@ terms of the NumPy License. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: 2005/05/06 08:31:19 $ Pearu Peterson + """ +from __future__ import division import __version__ f2py_version = __version__.version diff --git a/numpy/f2py/f2py_testing.py b/numpy/f2py/f2py_testing.py index 0c78f3594..73eb2caed 100644 --- a/numpy/f2py/f2py_testing.py +++ b/numpy/f2py/f2py_testing.py @@ -1,3 +1,5 @@ +from __future__ import division + import sys import re diff --git a/numpy/f2py/f90mod_rules.py b/numpy/f2py/f90mod_rules.py index e4a4b0e96..3a80eb8f4 100644 --- a/numpy/f2py/f90mod_rules.py +++ b/numpy/f2py/f90mod_rules.py @@ -11,7 +11,9 @@ terms of the NumPy License. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: 2005/02/03 19:30:23 $ Pearu Peterson + """ +from __future__ import division __version__ = "$Revision: 1.27 $"[10:-1] diff --git a/numpy/f2py/func2subr.py b/numpy/f2py/func2subr.py index f746108ad..eb72c76c9 100644 --- a/numpy/f2py/func2subr.py +++ b/numpy/f2py/func2subr.py @@ -11,7 +11,9 @@ terms of the NumPy License. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: 2004/11/26 11:13:06 $ Pearu Peterson + """ +from __future__ import division __version__ = "$Revision: 1.16 $"[10:-1] diff --git a/numpy/f2py/info.py b/numpy/f2py/info.py index 8beaba228..b976fb2ea 100644 --- a/numpy/f2py/info.py +++ b/numpy/f2py/info.py @@ -1,5 +1,6 @@ """Fortran to Python Interface Generator. """ +from __future__ import division postpone_import = True diff --git a/numpy/f2py/rules.py b/numpy/f2py/rules.py index 982f8e5b3..b04f54e16 100644 --- a/numpy/f2py/rules.py +++ b/numpy/f2py/rules.py @@ -39,8 +39,7 @@ wrapper_function(args) cleanup_a return buildvalue -""" -""" + Copyright 1999,2000 Pearu Peterson all rights reserved, Pearu Peterson <pearu@ioc.ee> Permission to use, modify, and distribute this software is given under the @@ -49,7 +48,9 @@ terms of the NumPy License. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: 2005/08/30 08:58:42 $ Pearu Peterson + """ +from __future__ import division __version__ = "$Revision: 1.129 $"[10:-1] diff --git a/numpy/f2py/setup.py b/numpy/f2py/setup.py index 37aab191c..43de25225 100644 --- a/numpy/f2py/setup.py +++ b/numpy/f2py/setup.py @@ -14,7 +14,9 @@ NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Revision: 1.32 $ $Date: 2005/01/30 17:22:14 $ Pearu Peterson + """ +from __future__ import division __version__ = "$Id: setup.py,v 1.32 2005/01/30 17:22:14 pearu Exp $" diff --git a/numpy/f2py/tests/test_array_from_pyobj.py b/numpy/f2py/tests/test_array_from_pyobj.py index 0d525f3cf..ff8c16cd1 100644 --- a/numpy/f2py/tests/test_array_from_pyobj.py +++ b/numpy/f2py/tests/test_array_from_pyobj.py @@ -1,3 +1,5 @@ +from __future__ import division + import unittest import os import sys diff --git a/numpy/f2py/tests/test_assumed_shape.py b/numpy/f2py/tests/test_assumed_shape.py index e501b13c3..728c034ec 100644 --- a/numpy/f2py/tests/test_assumed_shape.py +++ b/numpy/f2py/tests/test_assumed_shape.py @@ -1,3 +1,5 @@ +from __future__ import division + import os import math diff --git a/numpy/f2py/tests/test_callback.py b/numpy/f2py/tests/test_callback.py index 5e0cda242..f903fbcb4 100644 --- a/numpy/f2py/tests/test_callback.py +++ b/numpy/f2py/tests/test_callback.py @@ -1,3 +1,5 @@ +from __future__ import division + from numpy.testing import * from numpy import array import math diff --git a/numpy/f2py/tests/test_kind.py b/numpy/f2py/tests/test_kind.py index a6d485a88..56a747096 100644 --- a/numpy/f2py/tests/test_kind.py +++ b/numpy/f2py/tests/test_kind.py @@ -1,3 +1,5 @@ +from __future__ import division + import os import math diff --git a/numpy/f2py/tests/test_mixed.py b/numpy/f2py/tests/test_mixed.py index f786f38dd..dc29d2b5d 100644 --- a/numpy/f2py/tests/test_mixed.py +++ b/numpy/f2py/tests/test_mixed.py @@ -1,3 +1,5 @@ +from __future__ import division + import os import math diff --git a/numpy/f2py/tests/test_return_character.py b/numpy/f2py/tests/test_return_character.py index 67c542688..fd8355ac3 100644 --- a/numpy/f2py/tests/test_return_character.py +++ b/numpy/f2py/tests/test_return_character.py @@ -1,3 +1,5 @@ +from __future__ import division + from numpy.testing import * from numpy import array from numpy.compat import asbytes diff --git a/numpy/f2py/tests/test_return_complex.py b/numpy/f2py/tests/test_return_complex.py index f8c6d226a..4cdc03993 100644 --- a/numpy/f2py/tests/test_return_complex.py +++ b/numpy/f2py/tests/test_return_complex.py @@ -1,3 +1,5 @@ +from __future__ import division + from numpy.testing import * from numpy import array import util diff --git a/numpy/f2py/tests/test_return_integer.py b/numpy/f2py/tests/test_return_integer.py index e1b3a37aa..a1af6b932 100644 --- a/numpy/f2py/tests/test_return_integer.py +++ b/numpy/f2py/tests/test_return_integer.py @@ -1,3 +1,5 @@ +from __future__ import division + from numpy.testing import * from numpy import array import util diff --git a/numpy/f2py/tests/test_return_logical.py b/numpy/f2py/tests/test_return_logical.py index 059b843dc..1c8dce532 100644 --- a/numpy/f2py/tests/test_return_logical.py +++ b/numpy/f2py/tests/test_return_logical.py @@ -1,3 +1,5 @@ +from __future__ import division + from numpy.testing import * from numpy import array import util diff --git a/numpy/f2py/tests/test_return_real.py b/numpy/f2py/tests/test_return_real.py index 5dc12708e..943a4972d 100644 --- a/numpy/f2py/tests/test_return_real.py +++ b/numpy/f2py/tests/test_return_real.py @@ -1,3 +1,5 @@ +from __future__ import division + from numpy.testing import * from numpy import array import math diff --git a/numpy/f2py/tests/test_size.py b/numpy/f2py/tests/test_size.py index a548e9885..72443b4f6 100644 --- a/numpy/f2py/tests/test_size.py +++ b/numpy/f2py/tests/test_size.py @@ -1,3 +1,5 @@ +from __future__ import division + import os import math diff --git a/numpy/f2py/tests/util.py b/numpy/f2py/tests/util.py index 627bc0af9..0584ae188 100644 --- a/numpy/f2py/tests/util.py +++ b/numpy/f2py/tests/util.py @@ -5,6 +5,7 @@ Utility functions for - detecting if compilers are present """ +from __future__ import division import os import sys diff --git a/numpy/f2py/use_rules.py b/numpy/f2py/use_rules.py index 021d08601..e47dfc6e5 100644 --- a/numpy/f2py/use_rules.py +++ b/numpy/f2py/use_rules.py @@ -13,7 +13,9 @@ terms of the NumPy License. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: 2000/09/10 12:35:43 $ Pearu Peterson + """ +from __future__ import division __version__ = "$Revision: 1.3 $"[10:-1] |