summaryrefslogtreecommitdiff
path: root/numpy/f2py
diff options
context:
space:
mode:
authorbertrand <bertrand.l3f@gmail.com>2016-06-13 20:53:10 -0400
committerbertrand <bertrand.l3f@gmail.com>2016-07-17 20:20:39 -0400
commita05b65337725072710ee00dd695aa2df47eb5b4e (patch)
tree45da2dda163dbcf299ccefeb3d9f361bec7c6782 /numpy/f2py
parenta94fd6122aa30b2cf24757c3e3e826d532c7fe6c (diff)
downloadnumpy-a05b65337725072710ee00dd695aa2df47eb5b4e.tar.gz
MAINT,DOC: add to compat.py3k a function to load modules. Fix some doc for f2py.compile (issue #7683)
Diffstat (limited to 'numpy/f2py')
-rw-r--r--numpy/f2py/__init__.py27
1 files changed, 17 insertions, 10 deletions
diff --git a/numpy/f2py/__init__.py b/numpy/f2py/__init__.py
index 50566ccc2..b9b86ba0e 100644
--- a/numpy/f2py/__init__.py
+++ b/numpy/f2py/__init__.py
@@ -22,25 +22,32 @@ def compile(source,
verbose=True,
source_fn=None,
extension='.f'
- ):
- ''' Build extension module from processing source with f2py.
+ ):
+ """
+ Build extension module from processing source with f2py.
Parameters
----------
source : str
Fortran source of module / subroutine to compile
modulename : str, optional
- the name of compiled python module
- extra_args: str, optional
- additional parameters passed to f2py
- verbose: bool, optional
- print f2py output to screen
- extension: {'.f', '.f90'}, optional
- filename extension influences the fortran compiler behavior
+ The name of the compiled python module
+ extra_args : str, optional
+ Additional parameters passed to f2py
+ verbose : bool, optional
+ Print f2py output to screen
+ source_fn : str, optional
+ Name of the file where the fortran source is written.
+ The default is to use a temporary file with the extension
+ provided by the `extension` parameter
+ extension : {'.f', '.f90'}, optional
+ Filename extension if `source_fn` is not provided.
+ The extension tells which fortran standard is used.
+ The default is `.f`, which implies F77 standard.
.. versionadded:: 1.11.0
- '''
+ """
from numpy.distutils.exec_command import exec_command
import tempfile
if source_fn is None: