3
=========================
5
=========================
7
:Author: Pearu Peterson <pearu@cens.ioc.ee>
8
:Web-site: http://cens.ioc.ee/projects/f2py2e/
9
:Date: $Date: 2005/09/16 08:36:45 $
10
:Revision: $Revision: 1.191 $
19
- Fixed compiler warnings.
23
- Fixed another dims calculation bug.
24
- Fixed dims calculation bug and added the corresponding check.
25
- Accept higher dimensional arrays if their effective rank matches.
26
Effective rank is multiplication of non-unit dimensions.
30
- Added support for numpy.distutils version 0.4.0.
34
- Added example about ``intent(callback,hide)`` usage. Updates.
39
- Fixed missing need kw error.
40
- Fixed getting callback non-existing extra arguments.
41
- External callback functions and extra_args can be set via
43
- Avoid crash when external callback function is not set.
47
- Enabled ``intent(out)`` for ``intent(aux)`` non-complex scalars.
48
- Fixed splitting lines in F90 fixed form mode.
49
- Fixed FORTRANAME typo, relevant when wrapping scalar functions with
50
``--no-wrap-functions``.
51
- Improved failure handling for callback functions.
52
- Fixed bug in writting F90 wrapper functions when a line length
57
- Fixed dependency issue with typedefs.
58
- Introduced ``-DUNDERSCORE_G77`` that cause extra underscore to be
59
used for external names that contain an underscore.
64
- Fixed using complex cb functions.
68
- Introduced parent_block key. Get ``use`` statements recursively
70
- Apply parameter values to kindselectors.
71
- Fixed bug evaluating ``selected_int_kind`` function.
72
- Ignore Name and Syntax errors when evaluating scalars.
73
- Treat ``<int>_intType`` as ``<int>`` in get_parameters.
74
- Added support for F90 line continuation in fix format mode.
75
- Include optional attribute of external to signature file.
76
- Add ``entry`` arguments to variable lists.
77
- Treat \xa0 character as space.
78
- Fixed bug where __user__ callback subroutine was added to its
80
- In strict 77 mode read only the first 72 columns.
81
- Fixed parsing ``v(i) = func(r)``.
82
- Fixed parsing ``integer*4::``.
83
- Fixed parsing ``1.d-8`` when used as a parameter value.
94
- Fixed ``_cpointer`` usage for subroutines.
95
- Fortran function ``_cpointer`` can be used for callbacks.
99
- Use result name when wrapping functions with subroutines.
103
- Fixed ``--help-link`` switch.
104
- Fixed ``--[no-]lower`` usage with ``-c`` option.
105
- Added support for ``.pyf.src`` template files.
109
- Using ``exec_command`` in ``compile()``.
114
- Disabled ``need_numpy_distutils`` function. From now on it is assumed
115
that proper version of ``numpy_distutils`` is already installed.
119
- Added support for wrapping unsigned integers. In a .pyf file
120
``integer(-1)``, ``integer(-2)``, ``integer(-4)`` correspond to
121
``unsigned char``, ``unsigned short``, ``unsigned`` C types,
124
* tests/c/return_real.py
126
- Added tests to wrap C functions returning float/double.
130
- Added ``_cpointer`` attribute to wrapped objects.
134
- ``_cpointer`` feature for wrapped module functions is not
135
functional at the moment.
136
- Introduced ``intent(aux)`` attribute. Useful to save a value
137
of a parameter to auxiliary C variable. Note that ``intent(aux)``
138
implies ``intent(c)``.
139
- Added ``usercode`` section. When ``usercode`` is used in ``python
140
module`` block twise then the contents of the second multi-line
141
block is inserted after the definition of external routines.
142
- Call-back function arguments can be CObjects.
146
- Allow call-back function arguments to be fortran objects.
147
- Allow call-back function arguments to be built-in functions.
151
- Fixed detection of a function signature from usage example.
152
- Cleaned up -h output for intent(callback) variables.
153
- Repair malformed argument list (missing argument name).
154
- Warn on the usage of multiple attributes without type specification.
155
- Evaluate only scalars ``<initexpr>`` (e.g. not of strings).
156
- Evaluate ``<initexpr>`` using parameters name space.
157
- Fixed resolving `<name>(<args>)[result(<result>)]` pattern.
158
- ``usercode`` can be used more than once in the same context.
160
Release 2.43.239_1831
161
=====================
165
- Made ``intent(in,inplace)`` to mean ``intent(inplace)``.
169
- Intoduced ``--help-link`` and ``--link-<resource>``
170
switches to link generated extension module with system
171
``<resource>`` as defined by numpy_distutils/system_info.py.
175
- Patch to make PyArray_CanCastSafely safe on 64-bit machines.
176
Fixes incorrect results when passing ``array('l')`` to
177
``real*8 intent(in,out,overwrite)`` arguments.
181
- Avoid empty continuation lines in Fortran wrappers.
185
- Adding ``\0`` at the end of a space-padded string, fixes tests
190
- Fixed splitting lines with string parameters.
192
Release 2.43.239_1806
193
=====================
197
- Fixed test site that failed after padding strings with spaces
202
- Documented ``intent(inplace)`` attribute.
203
- Documented ``intent(callback)`` attribute.
204
- Updated FAQ, added Users Feedback section.
208
- Padding longer (than provided from Python side) strings with spaces
209
(that is Fortran behavior) instead of nulls (that is C strncpy behavior).
213
- Undoing rmbadnames in Python and Fortran layers.
217
- Renaming common block items that have names identical to C keywords.
218
- Fixed wrapping blank common blocks.
222
- Updated numarray (0.9, 1.0, 1.1) support (patch by Todd Miller).
226
- Introduced ``intent(inplace)`` feature.
227
- Fix numarray reference counts (patch by Todd).
228
- Updated numarray (0.9, 1.0, 1.1) support (patch by Todd Miller).
229
- Enabled F2PY_REPORT_ON_ARRAY_COPY for Numarray.
233
- Always normalize .f2py_f2cmap keys to lower case.
237
- Disabled ``index`` macro as it conflicts with the one defined
239
- Moved ``externroutines`` up to make it visible to ``usercode``.
240
- Fixed bug in f90 code generation: no empty line continuation is
242
- Fixed undefined symbols failure when ``fortranname`` is used
243
to rename a wrapped function.
244
- Support for ``entry`` statement.
248
- Made is* functions more robust with respect to parameters that
249
have no typespec specified.
250
- Using ``size_t`` instead of ``int`` as the type of string
251
length. Fixes issues on 64-bit platforms.
255
- Fixed bug of installing ``f2py`` script as ``.exe`` file.
259
- ``--compiler=`` and ``--fcompiler=`` can be specified at the same time.
263
- Fixed dependency detection for non-intent(in|inout|inplace) arguments.
264
They must depend on their dimensions, not vice-versa.
265
- Don't match ``!!f2py`` as a start of f2py directive.
266
- Only effective intent attributes will be output to ``-h`` target.
267
- Introduced ``intent(callback)`` to build interface between Python
268
functions and Fortran external routines.
269
- Avoid including external arguments to __user__ modules.
270
- Initial hooks to evaluate ``kind`` and ``selected_int_kind``.
271
- Evaluating parameters in {char,kind}selectors and applying rmbadname.
272
- Evaluating parameters using also module parameters. Fixed the order
273
of parameter evaluation.
274
- Fixed silly bug: when block name was not lower cased, it was not
275
recognized correctly.
276
- Applying mapping '.false.'->'False', '.true.'->'True' to logical
277
parameters. TODO: Support for logical expressions is needed.
278
- Added support for multiple statements in one line (separated with semicolon).
279
- Impl. get_useparameters function for using parameter values from
281
- Applied Bertholds patch to fix bug in evaluating expressions
283
- Fixed bug in reading string parameters.
284
- Evaluating parameters in charselector. Code cleanup.
285
- Using F90 module parameters to resolve kindselectors.
286
- Made the evaluation of module data init-expression more robust.
287
- Support for ``entry`` statement.
288
- Fixed ``determineexprtype`` that in the case of parameters
289
returned non-dictionary objects.
290
- Use ``-*- fix -*-`` to specify that a file is in fixed format.
292
Release 2.39.235_1693
293
=====================
295
* fortranobject.{h,c}
297
- Support for allocatable string arrays.
301
- Call-back arguments can now be also instances that have ``__call__`` method
302
as well as instance methods.
306
- Introduced ``--include_paths <path1>:<path2>:..`` command line
308
- Added ``--compiler=`` support to change the C/C++ compiler from
313
- Handle ``XDY`` parameter constants.
317
- Handle ``XDY`` parameter constants.
319
- Introduced formatpattern to workaround a corner case where reserved
320
keywords are used in format statement. Other than that, format pattern
323
- Parameters are now fully evaluated.
325
* More splitting of documentation strings.
327
* func2subr.py - fixed bug for function names that f77 compiler
328
would set ``integer`` type.
330
Release 2.39.235_1660
331
=====================
335
- Fixed bug in using --f90flags=..
339
- Splitted generated documentation strings (to avoid MSVC issue when
342
- Ignore ``private`` module data.
344
Release 2.39.235_1644
345
=====================
347
:Date:24 February 2004
351
- Finished complete support for character arrays and arrays of strings.
352
- ``character*n a(m)`` is treated like ``character a(m,n)`` with ``intent(c)``.
353
- Character arrays are now considered as ordinary arrays (not as arrays
354
of strings which actually didn't work).
358
- Initial f2py manpage file f2py.1.
359
- Updated usersguide and other docs when using numpy_distutils 0.2.2
364
- Try harder to use .f2py_f2cmap mappings when kind is used.
368
- Included files are first search in the current directory and
369
then from the source file directory.
370
- Ignoring dimension and character selector changes.
371
- Fixed bug in Fortran 90 comments of fixed format.
372
- Warn when .pyf signatures contain undefined symbols.
373
- Better detection of source code formats. Using ``-*- fortran -*-``
374
or ``-*- f90 -*-`` in the first line of a Fortran source file is
375
recommended to help f2py detect the format, fixed or free,
376
respectively, correctly.
380
- Fixed intent(inout) scalars when typecode=='l'.
381
- Fixed intent(inout) scalars when not using numarray.
382
- Fixed intent(inout) scalars when using numarray.
386
- Updated for numpy_distutils 0.2.2 and up.
387
- Added numarray support to diagnose.
391
- Fixed nasty bug with intent(in,copy) complex slice arrays.
392
- Applied Todd's patch to support numarray's byteswapped or
393
misaligned arrays, requires numarray-0.8 or higher.
397
- Applying new hooks for numpy_distutils 0.2.2 and up, keeping
398
backward compatibility with depreciation messages.
399
- Using always os.system on non-posix platforms in f2py2e.compile
404
- Changed the order of buildcallback and usercode junks.
408
- Added so that docs/ and tests/ directories are included to RPMs.
412
- Installing f2py.py instead of f2py.bat under NT.
413
- Introduced ``--with-numpy_distutils`` that is useful when making
414
f2py tar-ball with numpy_distutils included.
416
Release 2.37.233-1545
417
=====================
419
:Date: 11 September 2003
423
- Introduced ``interface_usercode`` replacement. When ``usercode``
424
statement is used inside the first interface block, its contents
425
will be inserted at the end of initialization function of a F2PY
426
generated extension module (feature request: Berthold Hļæ½llmann).
427
- Introduced auxiliary function ``as_column_major_storage`` that
428
converts input array to an array with column major storage order
429
(feature request: Hans Petter Langtangen).
433
- Introduced ``pymethoddef`` statement.
437
- Fixed "#ifdef in #define TRYPYARRAYTEMPLATE" bug (patch thanks
438
to Bernhard Gschaider)
442
- Introduced ``getpymethod`` function.
443
- Enabled multi-line blocks in ``callprotoargument`` statement.
447
- Undone "Fixed Warning 43 emitted by Intel Fortran compiler" that
448
causes (curios) segfaults.
452
- Fixed segfaults (that were introduced with recent memory leak
453
fixes) when using allocatable arrays.
454
- Introduced F2PY_REPORT_ON_ARRAY_COPY CPP macro int-variable. If defined
455
then a message is printed to stderr whenever a copy of an array is
456
made and arrays size is larger than F2PY_REPORT_ON_ARRAY_COPY.
458
Release 2.35.229-1505
459
=====================
465
- Introduced ``usercode`` statement (dropped ``c_code`` hooks).
469
- Updated the CVS location of numpy_distutils.
473
- Introduced ``isint1array(var)`` for fixing ``integer*1 intent(out)``
476
* tests/f77/callback.py
478
Introduced some basic tests.
480
* src/fortranobject.{c,h}
482
- Fixed memory leaks when getting/setting allocatable arrays.
483
(Bug report by Bernhard Gschaider)
485
- Initial support for numarray (Todd Miller's patch). Use -DNUMARRAY
486
on the f2py command line to enable numarray support. Note that
487
there is no character arrays support and these hooks are not
488
tested with F90 compilers yet.
492
- Fixed reference counting bug that appeared when constructing extra
493
argument list to callback functions.
494
- Added ``PyArray_LONG != PyArray_INT`` test.
498
Undocumented ``--f90compiler``.
502
- Introduced ``usercode`` statement.
503
- Fixed newlines when outputting multi-line blocks.
504
- Optimized ``getlincoef`` loop and ``analyzevars`` for cases where
506
- Fixed callback string argument detection.
507
- Fixed evaluating expressions: only int|float expressions are
508
evaluated succesfully.
512
Documented -DF2PY_REPORT_ATEXIT feature.
516
Added CPU information and sys.prefix printout.
520
Added cwd to PYTHONPATH.
522
* tests/f??/return_{real,complex}.py
524
Pass "infinity" check in SunOS.
528
- Fixed ``integer*1 intent(out)`` support
529
- Fixed free format continuation of f2py generated F90 files.
533
Introduced tests for mixing Fortran 77, Fortran 90 fixed and free
534
format codes in one module.
538
- Fixed non-prototype warnings.
539
- Fixed Warning 43 emitted by Intel Fortran compiler.
540
- Avoid long lines in Fortran codes to reduce possible problems with
541
continuations of lines.
543
Public Release 2.32.225-1419
544
============================
546
:Date: 8 December 2002
550
Complete revision of F2PY Users Guide
554
- New file. A Python script to run all f2py unit tests.
556
* Removed files: buildmakefile.py, buildsetup.py.
560
- Added intent(out) scalar tests.
564
- Introduced. It contains jiffies, memusage, run, cmdline functions
565
useful for f2py unit tests site.
569
- Install numpy_distutils only if it is missing or is too old
574
- Fixed wrapping f90 module data.
575
- Fixed wrapping f90 module subroutines.
576
- Fixed f90 compiler warnings for wrapped functions by using interface
577
instead of external stmt for functions.
581
- Introduced return_*.py tests.
585
- Added optional signature argument to createfuncwrapper.
586
- In f2pywrappers routines, declare external, scalar, remaining
587
arguments in that order. Fixes compiler error 'Invalid declaration'
590
real function foo(a,b)
597
- Removed first-line comment information support.
598
- Introduced multiline block. Currently usable only for
599
``callstatement`` statement.
600
- Improved array length calculation in getarrlen(..).
601
- "From sky" program group is created only if ``groupcounter<1``.
603
- Added support for ``dimension(n:*)``, ``dimension(*:n)``. They are
604
treated as ``dimesnion(*)`` by f2py.
605
- Fixed parameter substitution (this fixes TODO item by Patrick
606
LeGresley, 22 Aug 2001).
610
- Disabled all makefile, setup, manifest file generation hooks.
611
- Disabled --[no]-external-modroutines option. All F90 module
612
subroutines will have Fortran/C interface hooks.
613
- --build-dir can be used with -c option.
614
- only/skip modes can be used with -c option.
615
- Fixed and documented `-h stdout` feature.
616
- Documented extra options.
617
- Introduced --quiet and --verbose flags.
621
- Fixed debugcapi hooks for intent(c) scalar call-back arguments
622
(bug report: Pierre Schnizer).
623
- Fixed intent(c) for scalar call-back arguments.
624
- Improved failure reports.
628
- Fixed complex(kind=..) to C type mapping bug. The following hold
629
complex==complex(kind=4)==complex*8, complex(kind=8)==complex*16
630
- Using signed_char for integer*1 (bug report: Steve M. Robbins).
631
- Fixed logical*8 function bug: changed its C correspondence to
633
- Fixed memory leak when returning complex scalar.
637
- Introduced a new function (for f2py test site, but could be useful
638
in general) ``compile(source[,modulename,extra_args])`` for
639
compiling fortran source codes directly from Python.
641
* src/fortranobject.c
643
- Multi-dimensional common block members and allocatable arrays
644
are returned as Fortran-contiguous arrays.
645
- Fixed NULL return to Python without exception.
646
- Fixed memory leak in getattr(<fortranobj>,'__doc__').
647
- <fortranobj>.__doc__ is saved to <fortranobj>.__dict__ (previously
648
it was generated each time when requested).
649
- Fixed a nasty typo from the previous item that caused data
650
corruption and occasional SEGFAULTs.
651
- array_from_pyobj accepts arbitrary rank arrays if the last dimension
652
is undefined. E.g. dimension(3,*) accepts a(3,4,5) and the result is
653
array with dimension(3,20).
654
- Fixed (void*) casts to make g++ happy (bug report: eric).
655
- Changed the interface of ARR_IS_NULL macro to avoid "``NULL used in
656
arithmetics``" warnings from g++.
658
* src/fortranobject.h
660
- Undone previous item. Defining NO_IMPORT_ARRAY for
661
src/fortranobject.c (bug report: travis)
662
- Ensured that PY_ARRAY_UNIQUE_SYMBOL is defined only for
663
src/fortranobject.c (bug report: eric).
667
- Introduced dummy routine feature.
668
- F77 and F90 wrapper subroutines (if any) as saved to different
669
files, <modulename>-f2pywrappers.f and <modulename>-f2pywrappers2.f90,
670
respectively. Therefore, wrapping F90 requires numpy_distutils >=
672
- Fixed compiler warnings about meaningless ``const void (*f2py_func)(..)``.
673
- Improved error messages for ``*_from_pyobj``.
674
- Changed __CPLUSPLUS__ macros to __cplusplus (bug report: eric).
675
- Changed (void*) casts to (f2py_init_func) (bug report: eric).
676
- Removed unnecessary (void*) cast for f2py_has_column_major_storage
677
in f2py_module_methods definition (bug report: eric).
678
- Changed the interface of f2py_has_column_major_storage function:
679
removed const from the 1st argument.
683
- Introduced -DPREPEND_FORTRAN.
684
- Fixed bus error on SGI by using PyFloat_AsDouble when ``__sgi`` is defined.
685
This seems to be `know bug`__ with Python 2.1 and SGI.
686
- string_from_pyobj accepts only arrays whos elements size==sizeof(char).
687
- logical scalars (intent(in),function) are normalized to 0 or 1.
688
- Removed NUMFROMARROBJ macro.
689
- (char|short)_from_pyobj now use int_from_pyobj.
690
- (float|long_double)_from_pyobj now use double_from_pyobj.
691
- complex_(float|long_double)_from_pyobj now use complex_double_from_pyobj.
692
- Rewrote ``*_from_pyobj`` to be more robust. This fixes segfaults if
693
getting * from a string. Note that int_from_pyobj differs
694
from PyNumber_Int in that it accepts also complex arguments
695
(takes the real part) and sequences (takes the 1st element).
696
- Removed unnecessary void* casts in NUMFROMARROBJ.
697
- Fixed casts in ``*_from_pyobj`` functions.
698
- Replaced CNUMFROMARROBJ with NUMFROMARROBJ.
700
.. __: http://sourceforge.net/tracker/index.php?func=detail&aid=435026&group_id=5470&atid=105470
704
- Introduced isdummyroutine().
705
- Fixed islong_* functions.
706
- Fixed isintent_in for intent(c) arguments (bug report: Pierre Schnizer).
707
- Introduced F2PYError and throw_error. Using throw_error, f2py
708
rejects illegal .pyf file constructs that otherwise would cause
709
compilation failures or python crashes.
710
- Fixed islong_long(logical*8)->True.
711
- Introduced islogical() and islogicalfunction().
712
- Fixed prototype string argument (bug report: eric).
714
* Updated README.txt and doc strings. Starting to use docutils.
716
* Speed up for ``*_from_pyobj`` functions if obj is a sequence.
718
* Fixed SegFault (reported by M.Braun) due to invalid ``Py_DECREF``
719
in ``GETSCALARFROMPYTUPLE``.
726
*** Fixed missing includes when wrapping F90 module data.
727
*** Fixed typos in docs of build_flib options.
728
*** Implemented prototype calculator if no callstatement or
729
callprotoargument statements are used. A warning is issued if
730
callstatement is used without callprotoargument.
731
*** Fixed transposing issue with array arguments in callback functions.
732
*** Removed -pyinc command line option.
733
*** Complete tests for Fortran 77 functions returning scalars.
734
*** Fixed returning character bug if --no-wrap-functions.
735
*** Described how to wrap F compiled Fortran F90 module procedures
736
with F2PY. See doc/using_F_compiler.txt.
737
*** Fixed the order of build_flib options when using --fcompiler=...
738
*** Recognize .f95 and .F95 files as Fortran sources with free format.
739
*** Cleaned up the output of 'f2py -h': removed obsolete items,
740
added build_flib options section.
741
*** Added --help-compiler option: it lists available Fortran compilers
742
as detected by numpy_distutils/command/build_flib.py. This option
743
is available only with -c option.
746
:Release: 2.13.175-1250
751
*** Fixed copying of non-contigious 1-dimensional arrays bug.
752
(Thanks to Travis O.).
755
:Release: 2.13.175-1242
760
*** Fixed ignoring type declarations.
761
*** Turned F2PY_REPORT_ATEXIT off by default.
762
*** Made MAX,MIN macros available by default so that they can be
763
always used in signature files.
764
*** Disabled F2PY_REPORT_ATEXIT for FreeBSD.
767
:Release: 2.13.175-1233
772
*** Fixed Win32 port when using f2py.bat. (Thanks to Erik Wilsher).
773
*** F2PY_REPORT_ATEXIT is disabled for MACs.
774
*** Fixed incomplete dependency calculator.
777
:Release: 2.13.175-1222
782
*** Plugged a memory leak for intent(out) arrays with overwrite=0.
783
*** Introduced CDOUBLE_to_CDOUBLE,.. functions for copy_ND_array.
784
These cast functions probably work incorrectly in Numeric.
787
:Release: 2.13.175-1212
788
:Date: 23 February 2002
792
*** Updated f2py for the latest numpy_distutils.
793
*** A nasty bug with multi-dimensional Fortran arrays is fixed
794
(intent(out) arrays had wrong shapes). (Thanks to Eric for
795
pointing out this bug).
796
*** F2PY_REPORT_ATEXIT is disabled by default for __WIN32__.
799
:Release: 2.11.174-1161
800
:Date: 14 February 2002
804
*** Updated f2py for the latest numpy_distutils.
805
*** Fixed raise error when f2py missed -m flag.
806
*** Script name `f2py' now depends on the name of python executable.
807
For example, `python2.2 setup.py install' will create a f2py
808
script with a name `f2py2.2'.
809
*** Introduced 'callprotoargument' statement so that proper prototypes
810
can be declared. This is crucial when wrapping C functions as it
811
will fix segmentation faults when these wrappers use non-pointer
812
arguments (thanks to R. Clint Whaley for explaining this to me).
813
Note that in f2py generated wrapper, the prototypes have
815
extern #rtype# #fortranname#(#callprotoargument#);
817
extern #rtype# F_FUNC(#fortranname#,#FORTRANNAME#)(#callprotoargument#);
818
*** Cosmetic fixes to F2PY_REPORT_ATEXIT feature.
821
:Release: 2.11.174-1146
822
:Date: 3 February 2002
826
*** Reviewed reference counting in call-back mechanism. Fixed few bugs.
827
*** Enabled callstatement for complex functions.
828
*** Fixed bug with initializing capi_overwrite_<varname>
829
*** Introduced intent(overwrite) that is similar to intent(copy) but
830
has opposite effect. Renamed copy_<name>=1 to overwrite_<name>=0.
831
intent(overwrite) will make default overwrite_<name>=1.
832
*** Introduced intent(in|inout,out,out=<name>) attribute that renames
833
arguments name when returned. This renaming has effect only in
834
documentation strings.
835
*** Introduced 'callstatement' statement to pyf file syntax. With this
836
one can specify explicitly how wrapped function should be called
837
from the f2py generated module. WARNING: this is a dangerous feature
838
and should be used with care. It is introduced to provide a hack
839
to construct wrappers that may have very different signature
840
pattern from the wrapped function. Currently 'callstatement' can
841
be used only inside a subroutine or function block (it should be enough
842
though) and must be only in one continuous line. The syntax of the
843
statement is: callstatement <C-expression>;
847
:Date: 18 January 2002
851
*** Fixed memory-leak for PyFortranObject.
852
*** Introduced extra keyword argument copy_<varname> for intent(copy)
853
variables. It defaults to 1 and forces to make a copy for
854
intent(in) variables when passing on to wrapped functions (in case
855
they undesirably change the variable in-situ).
856
*** Introduced has_column_major_storage member function for all f2py
857
generated extension modules. It is equivalent to Python call
858
'transpose(obj).iscontiguous()' but very efficient.
859
*** Introduced -DF2PY_REPORT_ATEXIT. If this is used when compiling,
860
a report is printed to stderr as python exits. The report includes
861
the following timings:
862
1) time spent in all wrapped function calls;
863
2) time spent in f2py generated interface around the wrapped
864
functions. This gives a hint whether one should worry
865
about storing data in proper order (C or Fortran).
866
3) time spent in Python functions called by wrapped functions
867
through call-back interface.
868
4) time spent in f2py generated call-back interface.
869
For now, -DF2PY_REPORT_ATEXIT is enabled by default. Use
870
-DF2PY_REPORT_ATEXIT_DISABLE to disable it (I am not sure if
871
Windows has needed tools, let me know).
872
Also, I appreciate if you could send me the output of 'F2PY
873
performance report' (with CPU and platform information) so that I
874
could optimize f2py generated interfaces for future releases.
875
*** Extension modules can be linked with dmalloc library. Use
876
-DDMALLOC when compiling.
877
*** Moved array_from_pyobj to fortranobject.c.
878
*** Usage of intent(inout) arguments is made more strict -- only
879
with proper type contiguous arrays are accepted. In general,
880
you should avoid using intent(inout) attribute as it makes
881
wrappers of C and Fortran functions asymmetric. I recommend using
882
intent(in,out) instead.
883
*** intent(..) has new keywords: copy,cache.
884
intent(copy,in) - forces a copy of an input argument; this
885
may be useful for cases where the wrapped function changes
886
the argument in situ and this may not be desired side effect.
887
Otherwise, it is safe to not use intent(copy) for the sake
888
of a better performance.
889
intent(cache,hide|optional) - just creates a junk of memory.
890
It does not care about proper storage order. Can be also
891
intent(in) but then the corresponding argument must be a
892
contiguous array with a proper elsize.
893
*** intent(c) can be used also for subroutine names so that
894
-DNO_APPEND_FORTRAN can be avoided for C functions.
896
*** IMPORTANT BREAKING GOOD ... NEWS!!!:
898
From now on you don't have to worry about the proper storage order
899
in multi-dimensional arrays that was earlier a real headache when
900
wrapping Fortran functions. Now f2py generated modules take care
901
of the proper conversations when needed. I have carefully designed
902
and optimized this interface to avoid any unnecessary memory usage
903
or copying of data. However, it is wise to use input arrays that
904
has proper storage order: for C arguments it is row-major and for
905
Fortran arguments it is column-major. But you don't need to worry
906
about that when developing your programs. The optimization of
907
initializing the program with proper data for possibly better
908
memory usage can be safely postponed until the program is working.
910
This change also affects the signatures in .pyf files. If you have
911
created wrappers that take multi-dimensional arrays in arguments,
912
it is better to let f2py re-generate these files. Or you have to
913
manually do the following changes: reverse the axes indices in all
914
'shape' macros. For example, if you have defined an array A(n,m)
915
and n=shape(A,1), m=shape(A,0) then you must change the last
916
statements to n=shape(A,0), m=shape(A,1).
920
:Date: 13 January 2002
924
*** Fixed -c process. Removed pyf_extensions function and pyf_file class.
925
*** Reorganized setup.py. It generates f2py or f2py.bat scripts
926
depending on the OS and the location of the python executable.
927
*** Started to use update_version from numpy_distutils that makes
928
f2py startup faster. As a side effect, the version number system
930
*** Introduced test-site/test_f2py2e.py script that runs all
932
*** Fixed global variables initialization problem in crackfortran
933
when run_main is called several times.
934
*** Added 'import Numeric' to C/API init<module> function.
935
*** Fixed f2py.bat in setup.py.
936
*** Switched over to numpy_distutils and dropped fortran_support.
937
*** On Windows create f2py.bat file.
938
*** Introduced -c option: read fortran or pyf files, construct extension
939
modules, build, and save them to current directory.
940
In one word: do-it-all-in-one-call.
941
*** Introduced pyf_extensions(sources,f2py_opts) function. It simplifies
942
the extension building process considerably. Only for internal use.
943
*** Converted tests to use numpy_distutils in order to improve portability:
945
*** f2py2e.run_main() returns a pyf_file class instance containing
946
information about f2py generated files.
947
*** Introduced `--build-dir <dirname>' command line option.
948
*** Fixed setup.py for bdist_rpm command.
949
*** Added --numpy-setup command line option.
950
*** Fixed crackfortran that did not recognized capitalized type
951
specification with --no-lower flag.
952
*** `-h stdout' writes signature to stdout.
953
*** Fixed incorrect message for check() with empty name list.
957
:Date: 17 December 2001
961
*** Added command line option --[no-]manifest.
962
*** `make test' should run on Windows, but the results are not truthful.
963
*** Reorganized f2py2e.py a bit. Introduced run_main(comline_list) function
964
that can be useful when running f2py from another Python module.
965
*** Removed command line options -f77,-fix,-f90 as the file format
966
is determined from the extension of the fortran file
967
or from its header (first line starting with `!%' and containing keywords
968
free, fix, or f77). The later overrides the former one.
969
*** Introduced command line options --[no-]makefile,--[no-]latex-doc.
970
Users must explicitly use --makefile,--latex-doc if Makefile-<modulename>,
971
<modulename>module.tex is desired. --setup is default. Use --no-setup
972
to disable setup_<modulename>.py generation. --overwrite-makefile
974
*** Added `f2py_rout_' to #capiname# in rules.py.
975
*** intent(...) statement with empty namelist forces intent(...) attribute for
977
*** Dropped DL_IMPORT and DL_EXPORT in fortranobject.h.
978
*** Added missing PyFortran_Type.ob_type initialization.
979
*** Added gcc-3.0 support.
980
*** Raising non-existing/broken Numeric as a FatalError exception.
981
*** Fixed Python 2.x specific += construct in fortran_support.py.
982
*** Fixed copy_ND_array for 1-rank arrays that used to call calloc(0,..)
983
and caused core dump with a non-gcc compiler (Thanks to Pierre Schnizer
984
for reporting this bug).
985
*** Fixed "warning: variable `..' might be clobbered by `longjmp' or `vfork'":
986
- Reorganized the structure of wrapper functions to get rid of
987
`goto capi_fail' statements that caused the above warning.
991
:Date: 12 December 2001
995
*** Issues with the Win32 support (thanks to Eric Jones and Tiffany Kamm):
996
- Using DL_EXPORT macro for init#modulename#.
997
- Changed PyObject_HEAD_INIT(&PyType_Type) to PyObject_HEAD_INIT(0).
998
- Initializing #name#_capi=NULL instead of Py_None in cb hooks.
999
*** Fixed some 'warning: function declaration isn't a prototype', mainly
1000
in fortranobject.{c,h}.
1001
*** Fixed 'warning: missing braces around initializer'.
1002
*** Fixed reading a line containing only a label.
1003
*** Fixed nonportable 'cp -fv' to shutil.copy in f2py2e.py.
1004
*** Replaced PyEval_CallObject with PyObject_CallObject in cb_rules.
1005
*** Replaced Py_DECREF with Py_XDECREF when freeing hidden arguments.
1006
(Reason: Py_DECREF caused segfault when an error was raised)
1007
*** Impl. support for `include "file"' (in addition to `include 'file'')
1008
*** Fixed bugs (buildsetup.py missing in Makefile, in generated MANIFEST.in)
1012
:Date: 4 December 2001
1016
*** Sending out the third public release of f2py.
1017
*** Support for Intel(R) Fortran Compiler (thanks to Patrick LeGresley).
1018
*** Introduced `threadsafe' statement to pyf-files (or to be used with
1019
the 'f2py' directive in fortran codes) to force
1020
Py_BEGIN|END_ALLOW_THREADS block around the Fortran subroutine
1021
calling statement in Python C/API. `threadsafe' statement has
1022
an effect only inside a subroutine block.
1023
*** Introduced `fortranname <name>' statement to be used only within
1024
pyf-files. This is useful when the wrapper (Python C/API) function
1025
has different name from the wrapped (Fortran) function.
1026
*** Introduced `intent(c)' directive and statement. It is useful when
1027
wrapping C functions. Use intent(c) for arguments that are
1028
scalars (not pointers) or arrays (with row-ordering of elements).
1032
:Date: 3 December 2001
1036
*** f2py2e can be installed using distutils (run `python setup.py install').
1037
*** f2py builds setup_<modulename>.py. Use --[no-]setup to control this
1038
feature. setup_<modulename>.py uses fortran_support module (from SciPy),
1039
but for your convenience it is included also with f2py as an additional
1040
package. Note that it has not as many compilers supported as with
1041
using Makefile-<modulename>, but new compilers should be added to
1042
fortran_support module, not to f2py2e package.
1043
*** Fixed some compiler warnings about else statements.