diff options
| -rw-r--r-- | doc/source/f2py/advanced.rst | 18 | ||||
| -rw-r--r-- | doc/source/f2py/usage.rst | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/doc/source/f2py/advanced.rst b/doc/source/f2py/advanced.rst index fff756e38..9a7b88e69 100644 --- a/doc/source/f2py/advanced.rst +++ b/doc/source/f2py/advanced.rst @@ -96,27 +96,27 @@ and the corresponding <C type>. The <C type> can be one of the following:: complex_long_double string -For example, if you have a fortran file ``func1.f`` with the following: +For example, for a Fortran file ``func1.f`` containing: .. literalinclude:: ./code/f2cmap_demo.f :language: fortran -In order to convert ``int64`` and ``real64`` to vaild C data types, -you can create a ``.f2py_f2cmap`` file in the current directory: +In order to convert ``int64`` and ``real64`` to valid ``C`` data types, +a ``.f2py_f2cmap`` file with the following content can be created in the current directory: -.. code-block:: text +.. code-block:: python - dict(real=dict(real32='float', real64='double'), integer=dict(int64='long long')) + dict(real=dict(real64='double'), integer=dict(int64='long long')) -and create your module as usual. F2PY checks if a ``.f2py_f2cmap`` file is present -in the current directory and use it to map KIND specifiers to C data types. +and create the module as usual. F2PY checks if a ``.f2py_f2cmap`` file is present +in the current directory and will use it to map ``KIND`` specifiers to ``C`` data types. .. code-block:: sh f2py -c func1.f -m func1 -Alternatively, you can save the mapping file with any other name, for example -``mapfile.txt``, and use the ``--f2cmap`` option to pass the file to F2PY. +Alternatively, the mapping file can be saved with any other name, for example +``mapfile.txt``, and this information can be passed to F2PY by using the ``--f2cmap`` option. .. code-block:: sh diff --git a/doc/source/f2py/usage.rst b/doc/source/f2py/usage.rst index bb7565e2a..04f5a8c7d 100644 --- a/doc/source/f2py/usage.rst +++ b/doc/source/f2py/usage.rst @@ -221,7 +221,7 @@ Other options All F2PY generated files are created in ``<dirname>``. Default is ``tempfile.mkdtemp()``. ``--f2cmap <filename>`` - Load Fortran-to-Python KIND specification from the given file. + Load Fortran-to-C ``KIND`` specifications from the given file. ``--quiet`` Run quietly. ``--verbose`` |
