diff options
-rw-r--r-- | doc/source/f2py/advanced.rst | 8 | ||||
-rw-r--r-- | doc/source/f2py/code/allocarr.f90 (renamed from doc/source/f2py/allocarr.f90) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/array.f (renamed from doc/source/f2py/array.f) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/calculate.f (renamed from doc/source/f2py/calculate.f) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/callback.f (renamed from doc/source/f2py/callback.f) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/callback2.pyf (renamed from doc/source/f2py/callback2.pyf) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/common.f (renamed from doc/source/f2py/common.f) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/extcallback.f (renamed from doc/source/f2py/extcallback.f) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/fib1.f (renamed from doc/source/f2py/fib1.f) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/fib1.pyf (renamed from doc/source/f2py/fib1.pyf) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/fib2.pyf (renamed from doc/source/f2py/fib2.pyf) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/fib3.f (renamed from doc/source/f2py/fib3.f) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/ftype.f (renamed from doc/source/f2py/ftype.f) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/moddata.f90 (renamed from doc/source/f2py/moddata.f90) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/results/allocarr_session.dat (renamed from doc/source/f2py/allocarr_session.dat) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/results/array_session.dat (renamed from doc/source/f2py/array_session.dat) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/results/calculate_session.dat (renamed from doc/source/f2py/calculate_session.dat) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/results/callback_session.dat (renamed from doc/source/f2py/callback_session.dat) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/results/common_session.dat (renamed from doc/source/f2py/common_session.dat) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/results/compile_session.dat (renamed from doc/source/f2py/compile_session.dat) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/results/extcallback_session.dat (renamed from doc/source/f2py/extcallback_session.dat) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/results/ftype_session.dat (renamed from doc/source/f2py/ftype_session.dat) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/results/moddata_session.dat (renamed from doc/source/f2py/moddata_session.dat) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/results/run_main_session.dat (renamed from doc/source/f2py/run_main_session.dat) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/results/scalar_session.dat (renamed from doc/source/f2py/scalar_session.dat) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/results/spam_session.dat (renamed from doc/source/f2py/spam_session.dat) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/results/string_session.dat (renamed from doc/source/f2py/string_session.dat) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/results/var_session.dat (renamed from doc/source/f2py/var_session.dat) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/scalar.f (renamed from doc/source/f2py/scalar.f) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/setup_example.py (renamed from doc/source/f2py/setup_example.py) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/spam.pyf (renamed from doc/source/f2py/spam.pyf) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/string.f (renamed from doc/source/f2py/string.f) | 0 | ||||
-rw-r--r-- | doc/source/f2py/code/var.pyf (renamed from doc/source/f2py/var.pyf) | 0 | ||||
-rw-r--r-- | doc/source/f2py/distutils.rst | 4 | ||||
-rw-r--r-- | doc/source/f2py/f2py.getting-started.rst | 35 | ||||
-rw-r--r-- | doc/source/f2py/python-usage.rst | 82 | ||||
-rw-r--r-- | numpy/f2py/__init__.py | 4 | ||||
-rwxr-xr-x | numpy/f2py/f2py2e.py | 4 |
38 files changed, 68 insertions, 69 deletions
diff --git a/doc/source/f2py/advanced.rst b/doc/source/f2py/advanced.rst index 1b4625dde..a726de39c 100644 --- a/doc/source/f2py/advanced.rst +++ b/doc/source/f2py/advanced.rst @@ -10,7 +10,7 @@ signature files using ``usercode`` and ``pymethoddef`` statements (they must be used inside the ``python module`` block). For example, the following signature file ``spam.pyf`` -.. include:: spam.pyf +.. include:: ./code/spam.pyf :literal: wraps the C library function ``system()``:: @@ -19,7 +19,7 @@ wraps the C library function ``system()``:: In Python: -.. include:: spam_session.dat +.. include:: ./code/results/spam_session.dat :literal: Modifying the dictionary of a F2PY generated module @@ -29,7 +29,7 @@ The following example illustrates how to add user-defined variables to a F2PY generated extension module. Given the following signature file -.. include:: var.pyf +.. include:: ./code/var.pyf :literal: compile it as ``f2py -c var.pyf``. @@ -41,7 +41,7 @@ additional details). In Python: -.. include:: var_session.dat +.. include:: ./code/results/var_session.dat :literal: diff --git a/doc/source/f2py/allocarr.f90 b/doc/source/f2py/code/allocarr.f90 index e0d6c2ec8..e0d6c2ec8 100644 --- a/doc/source/f2py/allocarr.f90 +++ b/doc/source/f2py/code/allocarr.f90 diff --git a/doc/source/f2py/array.f b/doc/source/f2py/code/array.f index ef20c9c20..ef20c9c20 100644 --- a/doc/source/f2py/array.f +++ b/doc/source/f2py/code/array.f diff --git a/doc/source/f2py/calculate.f b/doc/source/f2py/code/calculate.f index 4ff570d28..4ff570d28 100644 --- a/doc/source/f2py/calculate.f +++ b/doc/source/f2py/code/calculate.f diff --git a/doc/source/f2py/callback.f b/doc/source/f2py/code/callback.f index d5cfc7574..d5cfc7574 100644 --- a/doc/source/f2py/callback.f +++ b/doc/source/f2py/code/callback.f diff --git a/doc/source/f2py/callback2.pyf b/doc/source/f2py/code/callback2.pyf index 3d77eed24..3d77eed24 100644 --- a/doc/source/f2py/callback2.pyf +++ b/doc/source/f2py/code/callback2.pyf diff --git a/doc/source/f2py/common.f b/doc/source/f2py/code/common.f index b098ab20c..b098ab20c 100644 --- a/doc/source/f2py/common.f +++ b/doc/source/f2py/code/common.f diff --git a/doc/source/f2py/extcallback.f b/doc/source/f2py/code/extcallback.f index 9a800628e..9a800628e 100644 --- a/doc/source/f2py/extcallback.f +++ b/doc/source/f2py/code/extcallback.f diff --git a/doc/source/f2py/fib1.f b/doc/source/f2py/code/fib1.f index cfbb1eea0..cfbb1eea0 100644 --- a/doc/source/f2py/fib1.f +++ b/doc/source/f2py/code/fib1.f diff --git a/doc/source/f2py/fib1.pyf b/doc/source/f2py/code/fib1.pyf index 3d6cc0a54..3d6cc0a54 100644 --- a/doc/source/f2py/fib1.pyf +++ b/doc/source/f2py/code/fib1.pyf diff --git a/doc/source/f2py/fib2.pyf b/doc/source/f2py/code/fib2.pyf index 4a5ae29f1..4a5ae29f1 100644 --- a/doc/source/f2py/fib2.pyf +++ b/doc/source/f2py/code/fib2.pyf diff --git a/doc/source/f2py/fib3.f b/doc/source/f2py/code/fib3.f index 08b050cd2..08b050cd2 100644 --- a/doc/source/f2py/fib3.f +++ b/doc/source/f2py/code/fib3.f diff --git a/doc/source/f2py/ftype.f b/doc/source/f2py/code/ftype.f index cabbb9e2d..cabbb9e2d 100644 --- a/doc/source/f2py/ftype.f +++ b/doc/source/f2py/code/ftype.f diff --git a/doc/source/f2py/moddata.f90 b/doc/source/f2py/code/moddata.f90 index 0e98f0467..0e98f0467 100644 --- a/doc/source/f2py/moddata.f90 +++ b/doc/source/f2py/code/moddata.f90 diff --git a/doc/source/f2py/allocarr_session.dat b/doc/source/f2py/code/results/allocarr_session.dat index ba168c22a..ba168c22a 100644 --- a/doc/source/f2py/allocarr_session.dat +++ b/doc/source/f2py/code/results/allocarr_session.dat diff --git a/doc/source/f2py/array_session.dat b/doc/source/f2py/code/results/array_session.dat index 714c03651..714c03651 100644 --- a/doc/source/f2py/array_session.dat +++ b/doc/source/f2py/code/results/array_session.dat diff --git a/doc/source/f2py/calculate_session.dat b/doc/source/f2py/code/results/calculate_session.dat index c4c380700..c4c380700 100644 --- a/doc/source/f2py/calculate_session.dat +++ b/doc/source/f2py/code/results/calculate_session.dat diff --git a/doc/source/f2py/callback_session.dat b/doc/source/f2py/code/results/callback_session.dat index 460c9ce28..460c9ce28 100644 --- a/doc/source/f2py/callback_session.dat +++ b/doc/source/f2py/code/results/callback_session.dat diff --git a/doc/source/f2py/common_session.dat b/doc/source/f2py/code/results/common_session.dat index 2595bfbd5..2595bfbd5 100644 --- a/doc/source/f2py/common_session.dat +++ b/doc/source/f2py/code/results/common_session.dat diff --git a/doc/source/f2py/compile_session.dat b/doc/source/f2py/code/results/compile_session.dat index 5c42742be..5c42742be 100644 --- a/doc/source/f2py/compile_session.dat +++ b/doc/source/f2py/code/results/compile_session.dat diff --git a/doc/source/f2py/extcallback_session.dat b/doc/source/f2py/code/results/extcallback_session.dat index 5b97ab7cf..5b97ab7cf 100644 --- a/doc/source/f2py/extcallback_session.dat +++ b/doc/source/f2py/code/results/extcallback_session.dat diff --git a/doc/source/f2py/ftype_session.dat b/doc/source/f2py/code/results/ftype_session.dat index e39cc128d..e39cc128d 100644 --- a/doc/source/f2py/ftype_session.dat +++ b/doc/source/f2py/code/results/ftype_session.dat diff --git a/doc/source/f2py/moddata_session.dat b/doc/source/f2py/code/results/moddata_session.dat index 824bd86fc..824bd86fc 100644 --- a/doc/source/f2py/moddata_session.dat +++ b/doc/source/f2py/code/results/moddata_session.dat diff --git a/doc/source/f2py/run_main_session.dat b/doc/source/f2py/code/results/run_main_session.dat index be6cacd22..be6cacd22 100644 --- a/doc/source/f2py/run_main_session.dat +++ b/doc/source/f2py/code/results/run_main_session.dat diff --git a/doc/source/f2py/scalar_session.dat b/doc/source/f2py/code/results/scalar_session.dat index 3bb45ed68..3bb45ed68 100644 --- a/doc/source/f2py/scalar_session.dat +++ b/doc/source/f2py/code/results/scalar_session.dat diff --git a/doc/source/f2py/spam_session.dat b/doc/source/f2py/code/results/spam_session.dat index bd5832d88..bd5832d88 100644 --- a/doc/source/f2py/spam_session.dat +++ b/doc/source/f2py/code/results/spam_session.dat diff --git a/doc/source/f2py/string_session.dat b/doc/source/f2py/code/results/string_session.dat index e8f7854d9..e8f7854d9 100644 --- a/doc/source/f2py/string_session.dat +++ b/doc/source/f2py/code/results/string_session.dat diff --git a/doc/source/f2py/var_session.dat b/doc/source/f2py/code/results/var_session.dat index fb0f798bf..fb0f798bf 100644 --- a/doc/source/f2py/var_session.dat +++ b/doc/source/f2py/code/results/var_session.dat diff --git a/doc/source/f2py/scalar.f b/doc/source/f2py/code/scalar.f index c22f639ed..c22f639ed 100644 --- a/doc/source/f2py/scalar.f +++ b/doc/source/f2py/code/scalar.f diff --git a/doc/source/f2py/setup_example.py b/doc/source/f2py/code/setup_example.py index 479acc004..479acc004 100644 --- a/doc/source/f2py/setup_example.py +++ b/doc/source/f2py/code/setup_example.py diff --git a/doc/source/f2py/spam.pyf b/doc/source/f2py/code/spam.pyf index 21ea18b77..21ea18b77 100644 --- a/doc/source/f2py/spam.pyf +++ b/doc/source/f2py/code/spam.pyf diff --git a/doc/source/f2py/string.f b/doc/source/f2py/code/string.f index 9246f02e7..9246f02e7 100644 --- a/doc/source/f2py/string.f +++ b/doc/source/f2py/code/string.f diff --git a/doc/source/f2py/var.pyf b/doc/source/f2py/code/var.pyf index 8275ff3af..8275ff3af 100644 --- a/doc/source/f2py/var.pyf +++ b/doc/source/f2py/code/var.pyf diff --git a/doc/source/f2py/distutils.rst b/doc/source/f2py/distutils.rst index 4cf30045e..007f866c9 100644 --- a/doc/source/f2py/distutils.rst +++ b/doc/source/f2py/distutils.rst @@ -12,8 +12,8 @@ sources, call F2PY to construct extension modules, etc. Consider the following `setup file`__: - .. include:: setup_example.py - :literal: + .. literalinclude:: ./code/setup_example.py + :language: python Running diff --git a/doc/source/f2py/f2py.getting-started.rst b/doc/source/f2py/f2py.getting-started.rst index 27ddbb005..655ca2803 100644 --- a/doc/source/f2py/f2py.getting-started.rst +++ b/doc/source/f2py/f2py.getting-started.rst @@ -12,28 +12,27 @@ following steps: catching all relevant information needed to create wrapper functions. -* Optionally, F2PY created signature files can be edited to optimize - wrappers functions, make them "smarter" and more "Pythonic". + * Optionally, F2PY created signature files can be edited to optimize + wrappers functions, make them "smarter" and more "Pythonic". * F2PY reads a signature file and writes a Python C/API module containing Fortran/C/Python bindings. - * F2PY compiles all sources and builds an extension module containing the wrappers. In building extension modules, F2PY uses ``numpy_distutils`` that supports a number of Fortran 77/90/95 compilers, including Gnu, Intel, - Sun Fortre, SGI MIPSpro, Absoft, NAG, Compaq etc. compilers. + Sun Fortran, SGI MIPSpro, Absoft, NAG, Compaq etc. compilers. Depending on a particular situation, these steps can be carried out either by just in one command or step-by-step, some steps can be omitted or combined with others. -Below I'll describe three typical approaches of using F2PY. +Below we describe three typical approaches of using F2PY. The following example Fortran 77 code will be used for illustration, save it as fib1.f: -.. include:: fib1.f - :literal: +.. literalinclude:: ./code/fib1.f + :language: fortran The quick way @@ -51,7 +50,7 @@ arguments to see the explanation of command line options) an extension module ``fib1.so`` (see ``-m`` flag) to the current directory. Now, in Python the Fortran subroutine ``FIB`` is accessible via ``fib1.fib``:: - >>> import numpy + >>> import numpy as np >>> import fib1 >>> print(fib1.fib.__doc__) fib(a,[n]) @@ -67,7 +66,7 @@ Python the Fortran subroutine ``FIB`` is accessible via ``fib1.fib``:: n : input int, optional Default: len(a) - >>> a = numpy.zeros(8, 'd') + >>> a = np.zeros(8, 'd') >>> fib1.fib(a) >>> print(a) [ 0. 1. 1. 2. 3. 5. 8. 13.] @@ -81,7 +80,7 @@ Python the Fortran subroutine ``FIB`` is accessible via ``fib1.fib``:: * One can use different values for optional ``n``:: - >>> a1 = numpy.zeros(8, 'd') + >>> a1 = np.zeros(8, 'd') >>> fib1.fib(a1, 6) >>> print(a1) [ 0. 1. 1. 2. 3. 5. 0. 0.] @@ -108,7 +107,7 @@ Python the Fortran subroutine ``FIB`` is accessible via ``fib1.fib``:: input array have no effect to the original argument, as demonstrated below:: - >>> a = numpy.ones(8, 'i') + >>> a = np.ones(8, 'i') >>> fib1.fib(a) >>> print(a) [1 1 1 1 1 1 1 1] @@ -123,7 +122,7 @@ Python the Fortran subroutine ``FIB`` is accessible via ``fib1.fib``:: if one specifies ``intent(inplace) a`` (see below, how), then the example above would read:: - >>> a = numpy.ones(8, 'i') + >>> a = np.ones(8, 'i') >>> fib1.fib(a) >>> print(a) [ 0. 1. 1. 2. 3. 5. 8. 13.] @@ -170,8 +169,8 @@ one. The signature file is saved to ``fib1.pyf`` (see ``-h`` flag) and its contents is shown below. - .. include:: fib1.pyf - :literal: + .. literalinclude:: ./code/fib1.pyf + :language: fortran * Next, we'll teach F2PY that the argument ``n`` is an input argument (use ``intent(in)`` attribute) and that the result, i.e. the @@ -184,8 +183,8 @@ one. The content of a modified version of ``fib1.pyf`` (saved as ``fib2.pyf``) is as follows: - .. include:: fib2.pyf - :literal: + .. literalinclude:: ./code/fib2.pyf + :language: fortran * And finally, we build the extension module by running @@ -244,8 +243,8 @@ them as normal lines. Here is shown a modified version of the previous Fortran code, save it as ``fib3.f``: -.. include:: fib3.f - :literal: +.. literalinclude:: ./code/fib3.f + :language: fortran Building the extension module can be now carried out in one command:: diff --git a/doc/source/f2py/python-usage.rst b/doc/source/f2py/python-usage.rst index 65c0cec64..28133f62f 100644 --- a/doc/source/f2py/python-usage.rst +++ b/doc/source/f2py/python-usage.rst @@ -19,15 +19,15 @@ of a function). Consider a Fortran 77 file ``ftype.f``: - .. include:: ftype.f - :literal: + .. literalinclude:: ./code/ftype.f + :language: fortran and build a wrapper using ``f2py -c ftype.f -m ftype``. In Python: - .. include:: ftype_session.dat - :literal: + .. literalinclude:: ./code/results/ftype_session.dat + :language: python Scalar arguments @@ -50,15 +50,15 @@ arrays with proper type but also other types work. Consider the following Fortran 77 code: - .. include:: scalar.f - :literal: + .. literalinclude:: ./code/scalar.f + :language: fortran and wrap it using ``f2py -c -m scalar scalar.f``. In Python: - .. include:: scalar_session.dat - :literal: + .. literalinclude:: ./code/results/scalar_session.dat + :language: python String arguments @@ -79,15 +79,15 @@ expects an array version of a string in order to have *in situ* changes be effec Consider the following Fortran 77 code: - .. include:: string.f - :literal: + .. literalinclude:: ./code/string.f + :language: fortran and wrap it using ``f2py -c -m mystring string.f``. Python session: - .. include:: string_session.dat - :literal: + .. literalinclude:: ./code/results/string_session.dat + :language: python Array arguments @@ -147,15 +147,15 @@ them to Fortran routines, use the function ``numpy.asfortranarray(<array>)``. Consider the following Fortran 77 code: - .. include:: array.f - :literal: + .. literalinclude:: ./code/array.f + :language: fortran and wrap it using ``f2py -c -m arr array.f -DF2PY_REPORT_ON_ARRAY_COPY=1``. In Python: - .. include:: array_session.dat - :literal: + .. literalinclude:: ./code/results/array_session.dat + :language: python .. _Call-back arguments: @@ -166,15 +166,15 @@ F2PY supports calling Python functions from Fortran or C codes. Consider the following Fortran 77 code: - .. include:: callback.f - :literal: + .. literalinclude:: ./code/callback.f + :language: fortran and wrap it using ``f2py -c -m callback callback.f``. In Python: - .. include:: callback_session.dat - :literal: + .. literalinclude:: ./code/results/callback_session.dat + :language: python In the above example F2PY was able to guess accurately the signature of a call-back function. However, sometimes F2PY cannot establish the @@ -198,7 +198,7 @@ file ``callback2.pyf`` using F2PY:: Then modify it as follows - .. include:: callback2.pyf + .. include:: ./code/callback2.pyf :literal: Finally, build the extension module using ``f2py -c callback2.pyf callback.f``. @@ -213,8 +213,8 @@ routines so that Python functions could be called from Fortran. Consider the following Fortran 77 subroutine that takes an array and applies a function ``func`` to its elements. - .. include:: calculate.f - :literal: + .. literalinclude:: ./code/calculate.f + :language: fortran It is expected that function ``func`` has been defined externally. In order to use a Python function as ``func``, it must @@ -225,8 +225,8 @@ Finally, build an extension module using ``f2py -c -m foo calculate.f`` In Python: - .. include:: calculate_session.dat - :literal: + .. literalinclude:: ./code/results/calculate_session.dat + :language: python The function is included as an argument to the python function call to the Fortran subroutine even though it was *not* in the Fortran subroutine argument @@ -240,15 +240,15 @@ the python callback function is itself called by another Fortran function. Consider the following Fortran 77 subroutine: - .. include:: extcallback.f - :literal: + .. literalinclude:: ./code/extcallback.f + :language: fortran and wrap it using ``f2py -c -m pfromf extcallback.f``. In Python: - .. include:: extcallback_session.dat - :literal: + .. literalinclude:: ./code/results/extcallback_session.dat + :language: python Resolving arguments to call-back functions ------------------------------------------ @@ -316,15 +316,15 @@ corresponding array objects. Consider the following Fortran 77 code: - .. include:: common.f - :literal: + .. literalinclude:: ./code/common.f + :language: fortran and wrap it using ``f2py -c -m common common.f``. In Python: - .. include:: common_session.dat - :literal: + .. literalinclude:: ./code/results/common_session.dat + :language: python Fortran 90 module data @@ -335,15 +335,15 @@ common blocks. Consider the following Fortran 90 code: - .. include:: moddata.f90 - :literal: + .. literalinclude:: ./code/moddata.f90 + :language: fortran and wrap it using ``f2py -c -m moddata moddata.f90``. In Python: - .. include:: moddata_session.dat - :literal: + .. literalinclude:: ./code/results/moddata_session.dat + :language: python Allocatable arrays @@ -353,12 +353,12 @@ F2PY has basic support for Fortran 90 module allocatable arrays. Consider the following Fortran 90 code: - .. include:: allocarr.f90 - :literal: + .. literalinclude:: ./code/allocarr.f90 + :language: fortran and wrap it using ``f2py -c -m allocarr allocarr.f90``. In Python: - .. include:: allocarr_session.dat - :literal: + .. literalinclude:: ./code/results/allocarr_session.dat + :language: python diff --git a/numpy/f2py/__init__.py b/numpy/f2py/__init__.py index 47354cd9d..a0fb73619 100644 --- a/numpy/f2py/__init__.py +++ b/numpy/f2py/__init__.py @@ -71,8 +71,8 @@ def compile(source, Examples -------- - .. include:: compile_session.dat - :literal: + .. literalinclude:: code/results/compile_session.dat + :language: python """ import tempfile diff --git a/numpy/f2py/f2py2e.py b/numpy/f2py/f2py2e.py index f45374be6..2e267cc6c 100755 --- a/numpy/f2py/f2py2e.py +++ b/numpy/f2py/f2py2e.py @@ -416,8 +416,8 @@ def run_main(comline_list): Examples -------- - .. include:: run_main_session.dat - :literal: + .. literalinclude:: code/results/run_main_session.dat + :language: python """ crackfortran.reset_global_f2py_vars() |