Professional Documents
Culture Documents
* capi_maps.py
- Fixed typos.
- Fixed using complex cb functions.
* crackfortran.py
- Introduced parent_block key. Get ``use`` statements recursively
from parent blocks.
- Apply parameter values to kindselectors.
- Fixed bug evaluating ``selected_int_kind`` function.
- Ignore Name and Syntax errors when evaluating scalars.
- Treat ``<int>_intType`` as ``<int>`` in get_parameters.
- Added support for F90 line continuation in fix format mode.
- Include optional attribute of external to signature file.
- Add ``entry`` arguments to variable lists.
- Treat \xa0 character as space.
- Fixed bug where __user__ callback subroutine was added to its
argument list.
- In strict 77 mode read only the first 72 columns.
- Fixed parsing ``v(i) = func(r)``.
- Fixed parsing ``integer*4::``.
- Fixed parsing ``1.d-8`` when used as a parameter value.
Release 2.45.241_1926
=====================
* diagnose.py
- Clean up output.
* cb_rules.py
- Fixed ``_cpointer`` usage for subroutines.
- Fortran function ``_cpointer`` can be used for callbacks.
* func2subr.py
- Use result name when wrapping functions with subroutines.
* f2py2e.py
- Fixed ``--help-link`` switch.
- Fixed ``--[no-]lower`` usage with ``-c`` option.
- Added support for ``.pyf.src`` template files.
* __init__.py
- Using ``exec_command`` in ``compile()``.
* setup.py
- Clean up.
- Disabled ``need_numpy_distutils`` function. From now on it is assumed
that proper version of ``numpy_distutils`` is already installed.
* capi_maps.py
- Added support for wrapping unsigned integers. In a .pyf file
``integer(-1)``, ``integer(-2)``, ``integer(-4)`` correspond to
Release 2.43.239_1831
=====================
* auxfuncs.py
- Made ``intent(in,inplace)`` to mean ``intent(inplace)``.
* f2py2e.py
- Intoduced ``--help-link`` and ``--link-<resource>``
switches to link generated extension module with system
``<resource>`` as defined by numpy_distutils/system_info.py.
* fortranobject.c
- Patch to make PyArray_CanCastSafely safe on 64-bit machines.
Fixes incorrect results when passing ``array('l')`` to
``real*8 intent(in,out,overwrite)`` arguments.
* rules.py
* capi_maps.py
- Always normalize .f2py_f2cmap keys to lower case.
* rules.py
- Disabled ``index`` macro as it conflicts with the one defined
in string.h.
- Moved ``externroutines`` up to make it visible to ``usercode``.
- Fixed bug in f90 code generation: no empty line continuation is
allowed.
- Fixed undefined symbols failure when ``fortranname`` is used
to rename a wrapped function.
- Support for ``entry`` statement.
* auxfuncs.py
- Made is* functions more robust with respect to parameters that
have no typespec specified.
- Using ``size_t`` instead of ``int`` as the type of string
length. Fixes issues on 64-bit platforms.
* setup.py
- Fixed bug of installing ``f2py`` script as ``.exe`` file.
* f2py2e.py
- ``--compiler=`` and ``--fcompiler=`` can be specified at the same time.
* crackfortran.py
- Fixed dependency detection for non-intent(in|inout|inplace) arguments.
They must depend on their dimensions, not vice-versa.
- Don't match ``!!f2py`` as a start of f2py directive.
- Only effective intent attributes will be output to ``-h`` target.
- Introduced ``intent(callback)`` to build interface between Python
functions and Fortran external routines.
- Avoid including external arguments to __user__ modules.
- Initial hooks to evaluate ``kind`` and ``selected_int_kind``.
- Evaluating parameters in {char,kind}selectors and applying rmbadname.
- Evaluating parameters using also module parameters. Fixed the order
of parameter evaluation.
- Fixed silly bug: when block name was not lower cased, it was not
recognized correctly.
- Applying mapping '.false.'->'False', '.true.'->'True' to logical
parameters. TODO: Support for logical expressions is needed.
- Added support for multiple statements in one line (separated with semicolon)
.
- Impl. get_useparameters function for using parameter values from
other f90 modules.
- Applied Bertholds patch to fix bug in evaluating expressions
like ``1.d0/dvar``.
- Fixed bug in reading string parameters.
- Evaluating parameters in charselector. Code cleanup.
- Using F90 module parameters to resolve kindselectors.
- Made the evaluation of module data init-expression more robust.
- Support for ``entry`` statement.
- Fixed ``determineexprtype`` that in the case of parameters
returned non-dictionary objects.
- Use ``-*- fix -*-`` to specify that a file is in fixed format.
Release 2.39.235_1693
=====================
* fortranobject.{h,c}
- Support for allocatable string arrays.
* cfuncs.py
- Call-back arguments can now be also instances that have ``__call__`` method
as well as instance methods.
* f2py2e.py
- Introduced ``--include_paths <path1>:<path2>:..`` command line
option.
- Added ``--compiler=`` support to change the C/C++ compiler from
f2py command line.
* capi_maps.py
- Handle ``XDY`` parameter constants.
* crackfortran.py
- Handle ``XDY`` parameter constants.
- Introduced formatpattern to workaround a corner case where reserved
keywords are used in format statement. Other than that, format pattern
has no use.
- Parameters are now fully evaluated.
* More splitting of documentation strings.
* func2subr.py - fixed bug for function names that f77 compiler
would set ``integer`` type.
Release 2.39.235_1660
=====================
* f2py2e.py
- Fixed bug in using --f90flags=..
* f90mod_rules.py
- Splitted generated documentation strings (to avoid MSVC issue when
string length>2k)
- Ignore ``private`` module data.
Release 2.39.235_1644
=====================
:Date:24 February 2004
* Character arrays:
- Finished complete support for character arrays and arrays of strings.
- ``character*n a(m)`` is treated like ``character a(m,n)`` with ``intent(c)``
.
- Character arrays are now considered as ordinary arrays (not as arrays
of strings which actually didn't work).
* docs
- Initial f2py manpage file f2py.1.
* src/fortranobject.{c,h}
- Fixed memory leaks when getting/setting allocatable arrays.
(Bug report by Bernhard Gschaider)
- Initial support for numarray (Todd Miller's patch). Use -DNUMARRAY
on the f2py command line to enable numarray support. Note that
there is no character arrays support and these hooks are not
tested with F90 compilers yet.
* cfuncs.py
- Fixed reference counting bug that appeared when constructing extra
argument list to callback functions.
- Added ``PyArray_LONG != PyArray_INT`` test.
* f2py2e.py
Undocumented ``--f90compiler``.
* crackfortran.py
- Introduced ``usercode`` statement.
- Fixed newlines when outputting multi-line blocks.
- Optimized ``getlincoef`` loop and ``analyzevars`` for cases where
len(vars) is large.
- Fixed callback string argument detection.
- Fixed evaluating expressions: only int|float expressions are
evaluated succesfully.
* docs
Documented -DF2PY_REPORT_ATEXIT feature.
* diagnose.py
Added CPU information and sys.prefix printout.
* tests/run_all.py
Added cwd to PYTHONPATH.
* tests/f??/return_{real,complex}.py
Pass "infinity" check in SunOS.
* rules.py
- Fixed ``integer*1 intent(out)`` support
- Fixed free format continuation of f2py generated F90 files.
* tests/mixed/
Introduced tests for mixing Fortran 77, Fortran 90 fixed and free
format codes in one module.
* f90mod_rules.py
- Fixed non-prototype warnings.
``callstatement`` statement.
- Improved array length calculation in getarrlen(..).
- "From sky" program group is created only if ``groupcounter<1``.
See TODO.txt.
- Added support for ``dimension(n:*)``, ``dimension(*:n)``. They are
treated as ``dimesnion(*)`` by f2py.
- Fixed parameter substitution (this fixes TODO item by Patrick
LeGresley, 22 Aug 2001).
* f2py2e.py
- Disabled all makefile, setup, manifest file generation hooks.
- Disabled --[no]-external-modroutines option. All F90 module
subroutines will have Fortran/C interface hooks.
- --build-dir can be used with -c option.
- only/skip modes can be used with -c option.
- Fixed and documented `-h stdout` feature.
- Documented extra options.
- Introduced --quiet and --verbose flags.
* cb_rules.py
- Fixed debugcapi hooks for intent(c) scalar call-back arguments
(bug report: Pierre Schnizer).
- Fixed intent(c) for scalar call-back arguments.
- Improved failure reports.
* capi_maps.py
- Fixed complex(kind=..) to C type mapping bug. The following hold
complex==complex(kind=4)==complex*8, complex(kind=8)==complex*16
- Using signed_char for integer*1 (bug report: Steve M. Robbins).
- Fixed logical*8 function bug: changed its C correspondence to
long_long.
- Fixed memory leak when returning complex scalar.
* __init__.py
- Introduced a new function (for f2py test site, but could be useful
in general) ``compile(source[,modulename,extra_args])`` for
compiling fortran source codes directly from Python.
* src/fortranobject.c
- Multi-dimensional common block members and allocatable arrays
are returned as Fortran-contiguous arrays.
- Fixed NULL return to Python without exception.
- Fixed memory leak in getattr(<fortranobj>,'__doc__').
- <fortranobj>.__doc__ is saved to <fortranobj>.__dict__ (previously
it was generated each time when requested).
- Fixed a nasty typo from the previous item that caused data
corruption and occasional SEGFAULTs.
- array_from_pyobj accepts arbitrary rank arrays if the last dimension
is undefined. E.g. dimension(3,*) accepts a(3,4,5) and the result is
array with dimension(3,20).
- Fixed (void*) casts to make g++ happy (bug report: eric).
- Changed the interface of ARR_IS_NULL macro to avoid "``NULL used in
arithmetics``" warnings from g++.
* src/fortranobject.h
Introduced isdummyroutine().
Fixed islong_* functions.
Fixed isintent_in for intent(c) arguments (bug report: Pierre Schnizer).
Introduced F2PYError and throw_error. Using throw_error, f2py
rejects illegal .pyf file constructs that otherwise would cause
compilation failures or python crashes.
- Fixed islong_long(logical*8)->True.
- Introduced islogical() and islogicalfunction().
- Fixed prototype string argument (bug report: eric).
* Updated README.txt and doc strings. Starting to use docutils.
* Speed up for ``*_from_pyobj`` functions if obj is a sequence.
From now on you don't have to worry about the proper storage order
in multi-dimensional arrays that was earlier a real headache when
wrapping Fortran functions. Now f2py generated modules take care
of the proper conversations when needed. I have carefully designed
and optimized this interface to avoid any unnecessary memory usage
or copying of data. However, it is wise to use input arrays that
has proper storage order: for C arguments it is row-major and for
Fortran arguments it is column-major. But you don't need to worry
about that when developing your programs. The optimization of
initializing the program with proper data for possibly better
memory usage can be safely postponed until the program is working.
This change also affects the signatures in .pyf files. If you have
created wrappers that take multi-dimensional arrays in arguments,
it is better to let f2py re-generate these files. Or you have to
manually do the following changes: reverse the axes indices in all
'shape' macros. For example, if you have defined an array A(n,m)
and n=shape(A,1), m=shape(A,0) then you must change the last
statements to n=shape(A,0), m=shape(A,1).
:Release: 2.8.172
:Date: 13 January 2002
::
*** Fixed -c process. Removed pyf_extensions function and pyf_file class.
*** Reorganized setup.py. It generates f2py or f2py.bat scripts
depending on the OS and the location of the python executable.
*** Started to use update_version from numpy_distutils that makes
f2py startup faster. As a side effect, the version number system
changed.
*** Introduced test-site/test_f2py2e.py script that runs all
tests.
*** Fixed global variables initialization problem in crackfortran
when run_main is called several times.
*** Added 'import Numeric' to C/API init<module> function.
*** Fixed f2py.bat in setup.py.
*** Switched over to numpy_distutils and dropped fortran_support.
*** On Windows create f2py.bat file.
*** Introduced -c option: read fortran or pyf files, construct extension
modules, build, and save them to current directory.
In one word: do-it-all-in-one-call.
*** Introduced pyf_extensions(sources,f2py_opts) function. It simplifies
the extension building process considerably. Only for internal use.
*** Converted tests to use numpy_distutils in order to improve portability:
a,b,c
*** f2py2e.run_main() returns a pyf_file class instance containing
information about f2py generated files.
*** Introduced `--build-dir <dirname>' command line option.
*** Fixed setup.py for bdist_rpm command.
*** Added --numpy-setup command line option.
*** Fixed crackfortran that did not recognized capitalized type
specification with --no-lower flag.
*** `-h stdout' writes signature to stdout.
*** Fixed incorrect message for check() with empty name list.
:Release: 2.4.366
:Date: 17 December 2001
::
*** Added command line option --[no-]manifest.
*** `make test' should run on Windows, but the results are not truthful.
*** Reorganized f2py2e.py a bit. Introduced run_main(comline_list) function
that can be useful when running f2py from another Python module.
*** Removed command line options -f77,-fix,-f90 as the file format
is determined from the extension of the fortran file
or from its header (first line starting with `!%' and containing keywords
free, fix, or f77). The later overrides the former one.
*** Introduced command line options --[no-]makefile,--[no-]latex-doc.
Users must explicitly use --makefile,--latex-doc if Makefile-<modulename>,
<modulename>module.tex is desired. --setup is default. Use --no-setup
to disable setup_<modulename>.py generation. --overwrite-makefile
will set --makefile.
*** Added `f2py_rout_' to #capiname# in rules.py.
*** intent(...) statement with empty namelist forces intent(...) attribute for
all arguments.
*** Dropped DL_IMPORT and DL_EXPORT in fortranobject.h.
*** Added missing PyFortran_Type.ob_type initialization.
*** Added gcc-3.0 support.
*** Raising non-existing/broken Numeric as a FatalError exception.
*** Fixed Python 2.x specific += construct in fortran_support.py.
*** Fixed copy_ND_array for 1-rank arrays that used to call calloc(0,..)
and caused core dump with a non-gcc compiler (Thanks to Pierre Schnizer
for reporting this bug).
*** Fixed "warning: variable `..' might be clobbered by `longjmp' or `vfork'":
- Reorganized the structure of wrapper functions to get rid of
`goto capi_fail' statements that caused the above warning.
:Release: 2.3.343
:Date: 12 December 2001
::
***
***
Issues with the Win32 support (thanks to Eric Jones and Tiffany Kamm):
Using DL_EXPORT macro for init#modulename#.
Changed PyObject_HEAD_INIT(&PyType_Type) to PyObject_HEAD_INIT(0).
Initializing #name#_capi=NULL instead of Py_None in cb hooks.
Fixed some 'warning: function declaration isn't a prototype', mainly
in fortranobject.{c,h}.
*** Fixed 'warning: missing braces around initializer'.
*** Fixed reading a line containing only a label.
*** Fixed nonportable 'cp -fv' to shutil.copy in f2py2e.py.
*** Replaced PyEval_CallObject with PyObject_CallObject in cb_rules.
*** Replaced Py_DECREF with Py_XDECREF when freeing hidden arguments.
(Reason: Py_DECREF caused segfault when an error was raised)
*** Impl. support for `include "file"' (in addition to `include 'file'')
*** Fixed bugs (buildsetup.py missing in Makefile, in generated MANIFEST.in)
:Release: 2.3.327
:Date: 4 December 2001
::
*** Sending out the third public release of f2py.
*** Support for Intel(R) Fortran Compiler (thanks to Patrick LeGresley).