<commit_before>
======================================================================
               F2PY Frequently Asked Questions
======================================================================

.. contents::

General information
===================

Q: How to get started?
----------------------

First, install__ F2PY. Then check that F2PY installation works
properly (see below__). Try out a `simple example`__.

Read `F2PY Users Guide and Reference Manual`__. It contains lots
of complete examples.

If you have any questions/problems when using F2PY, don't hesitate to
turn to `F2PY users mailing list`__ or directly to me.

__ index.html#installation
__ #testing
__ index.html#usage
__ usersguide/index.html
__ index.html#mailing-list

Q: When to report bugs?
-----------------------

* If F2PY scanning fails on Fortran sources that otherwise compile
  fine.

* After checking that you have the latest version of F2PY from its
  CVS.  It is possible that a bug has been fixed already. See also the
  log entries in the file `HISTORY.txt`_ (`HISTORY.txt in CVS`_).

* After checking that your Python and Numerical Python installations
  work correctly.

* After checking that your C and Fortran compilers work correctly.


Q: How to report bugs?
----------------------

You can send bug reports directly to me. Please, include information
about your platform (operating system, version) and
compilers/linkers, e.g. the output (both stdout/stderr) of
::

  python -c 'import f2py2e.diagnose;f2py2e.diagnose.run()'

Feel free to add any other relevant information.  However, avoid
sending the output of F2PY generated ``.pyf`` files (unless they are
manually modified) or any binary files like shared libraries or object
codes.

While reporting bugs, you may find the following notes useful:

* `How To Ask Questions The Smart Way`__ by <NAME> and <NAME>.

* `How to Report Bugs Effectively`__ by <NAME>.

__ http://www.catb.org/~esr/faqs/smart-questions.html
__ http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

Installation
============

Q: How to use F2PY with different Python versions?
--------------------------------------------------

Run the installation command using the corresponding Python
executable. For example,
::

    python2.1 setup.py install

installs the ``f2py`` script as ``f2py2.1``.

See `Distutils User Documentation`__ for more information how to
install Python modules to non-standard locations.

__ http://www.python.org/sigs/distutils-sig/doc/inst/inst.html


Q: Why F2PY is not working after upgrading?
-------------------------------------------

If upgrading from F2PY version 2.3.321 or earlier then remove all f2py
specific files from ``/path/to/python/bin`` directory before
running installation command.

Q: How to get/upgrade numpy_distutils when using F2PY from CVS?
---------------------------------------------------------------

To get numpy_distutils from SciPy CVS repository, run
::

  cd cvs/f2py2e/
  make numpy_distutils

This will checkout numpy_distutils to the current directory.

You can upgrade numpy_distutils by executing
::

  cd cvs/f2py2e/numpy_distutils
  cvs update -Pd

and install it by executing
::

  cd cvs/f2py2e/numpy_distutils
  python setup_numpy_distutils.py install

In most of the time, f2py2e and numpy_distutils can be upgraded
independently.

Testing
=======

Q: How to test if F2PY is installed correctly?
----------------------------------------------

Run
::

  f2py

without arguments. If F2PY is installed correctly then it should print
the usage information for f2py.

Q: How to test if F2PY is working correctly?
--------------------------------------------

For a quick test, try out an example problem from Usage__
section in `README.txt`_.

__ index.html#usage

For running F2PY unit tests, see `TESTING.txt`_.


Q: How to run tests and examples in f2py2e/test-suite/ directory?
---------------------------------------------------------------------

You shouldn't. These tests are obsolete and I have no intention to
make them work. They will be removed in future.


Compiler/Platform-specific issues
=================================

Q: What are supported platforms and compilers?
----------------------------------------------

F2PY is developed on Linux system with a GCC compiler (versions
2.95.x, 3.x). Fortran 90 related hooks are tested against Intel
Fortran Compiler. F2PY should work under any platform where Python and
Numeric are installed and has supported Fortran compiler installed.

To see a list of supported compilers, execute::

  f2py -c --help-fcompiler

Example output::<commit_msg>Updated FAQ with links to github issues page etc<commit_after>
======================================================================
               F2PY Frequently Asked Questions
======================================================================

.. contents::

General information
===================

Q: How to get started?
----------------------

First, install__ F2PY. Then check that F2PY installation works
properly (see below__). Try out a `simple example`__.

Read `F2PY Users Guide and Reference Manual`__. It contains lots
of complete examples.

If you have any questions/problems when using F2PY, don't hesitate to
turn to `F2PY users mailing list`__ or directly to me.

__ index.html#installation
__ #testing
__ index.html#usage
__ usersguide/index.html
__ index.html#mailing-list

Q: When to report bugs?
-----------------------

* If F2PY scanning fails on Fortran sources that otherwise compile
  fine.

* After checking that you have the latest version of F2PY from its
  CVS.  It is possible that a bug has been fixed already. See also the
  log entries in the file `HISTORY.txt`_ (`HISTORY.txt in CVS`_).

* After checking that your Python and Numerical Python installations
  work correctly.

* After checking that your C and Fortran compilers work correctly.

Q: How to report bugs?
----------------------

F2PY is part of NumPy. Report bugs on the NumPy issue tracker at
__ https://github.com/numpy/numpy/issues
Please, include information about your platform (operating system, 
version) and compilers/linkers, e.g. the output (both stdout/stderr) of
::

  python -c 'import numpy.f2py.diagnose;numpy.f2py.diagnose.run()'

Feel free to add any other relevant information.  However, avoid
sending the output of F2PY generated ``.pyf`` files (unless they are
manually modified) or any binary files like shared libraries or object
codes.

N.B. You may notice that other F2PY issues are tagged 'f2py'. Only the
admins can add tags to issues, don't waste time trying to work out how
to tag it yourself.

While reporting bugs, you may find the following notes useful:

* `How To Ask Questions The Smart Way`__ by <NAME> and <NAME>.

* `How to Report Bugs Effectively`__ by <NAME>.

__ http://www.catb.org/~esr/faqs/smart-questions.html
__ http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

Installation
============

Q: How to use F2PY with different Python versions?
--------------------------------------------------

Run the installation command using the corresponding Python
executable. For example,
::

    python2.1 setup.py install

installs the ``f2py`` script as ``f2py2.1``.

See `Distutils User Documentation`__ for more information how to
install Python modules to non-standard locations.

__ http://www.python.org/sigs/distutils-sig/doc/inst/inst.html


Q: Why F2PY is not working after upgrading?
-------------------------------------------

If upgrading from F2PY version 2.3.321 or earlier then remove all f2py
specific files from ``/path/to/python/bin`` directory before
running installation command.

Q: How to get/upgrade numpy and F2PY from git?
---------------------------------------------------------------

The numpy code repository is hosted on GitHub at
__ http://github.com/numpy/numpy

You can check it out with
::
    git clone git://github.com/numpy/numpy.git numpy

Installation information is at
__ http://www.scipy.org/scipylib/download.html

Information for developers is at
__ http://www.scipy.org/scipylib/dev-zone.html


Testing
=======

Q: How to test if F2PY is installed correctly?
----------------------------------------------

Run
::

  f2py

without arguments. If F2PY is installed correctly then it should print
the usage information for f2py.

Q: How to test if F2PY is working correctly?
--------------------------------------------

For a quick test, try out an example problem from Usage__
section in `README.txt`_.

__ index.html#usage

For running F2PY unit tests, see `TESTING.txt`_.


Compiler/Platform-specific issues
=================================

Q: What are supported platforms and compilers?
----------------------------------------------

F2PY is developed on Linux system with a GCC compiler (versions
2.95.x, 3.x). Fortran 90 related hooks are tested against Intel
Fortran Compiler. F2PY should work under any platform where Python and
Numeric are installed and has supported Fortran compiler installed.

To see a list of supported compilers, execute::

  f2py -c --help-fcompiler

Example output::
{'fraction_non_alphanumeric': 0.19, 'fraction_numerical': 0.01087912087912088, 'mean_word_length': 2.848202959830867, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 1, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2063775', 'n_tokens_mistral': 2514, 'n_tokens_neox': 2390, 'n_words': 1048}