summaryrefslogtreecommitdiff
path: root/numpy/f2py/capi_maps.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #22493 from mwtoews/maint-openSebastian Berg2023-04-281-1/+1
|\ | | | | MAINT: remove redundant open() modes and io.open() alias
| * MAINT: remove redundant open() modes and io.open() aliasMike Taves2022-10-291-1/+1
| |
* | BUG: fix for f2py string scalars (#23194)Alexander Heger2023-02-111-3/+3
|/ | | | | | | | | | | | | | in previous version, any string scalar was converted to a string array of dimension len, i.e., a definition character(len=N) :: X effectively became character(len=NNN), dimension(NNN) :: X from the point of few of the numpy (python) interface: X.shape == (NNN,) X.dtype == '|SNNN' Closes gh-23192
* BUG: Generate C typedefs for f2cmap typesRohit Goswami2022-06-101-0/+2
|
* ENH: Support character string arraysPearu Peterson2022-06-051-9/+52
| | | | | | | | | | | | | | | | TST: added test for issue #18684 ENH: f2py opens files with correct encoding, fixes #635 TST: added test for issue #6308 TST: added test for issue #4519 TST: added test for issue #3425 ENH: Implement user-defined hooks support for post-processing f2py data structure. Implement character BC hook. ENH: Add support for detecting utf-16 and utf-32 encodings.
* BUG: f2py cannot read in customised f2cmap fileTing Sun2022-03-161-2/+2
| | | | Fixes numpy/numpy#21204
* Fixing the typoSomasree Majumder2022-01-191-1/+2
|
* MAINT: Fix newlines in diagnostics output of numpy.f2py.Christoph Buchner2021-11-141-1/+1
| | | | | | Linebreaks were not consistently added to errmess/outmess arguments, which led to very long lines and wrong concatenation with compiler messages in f2py console output.
* MAINT,DOC: f2py cleanupRohit Goswami2021-09-201-17/+13
|
* MAINT: multiline regex class simplifyTyler Reddy2020-12-291-1/+1
| | | | | | * follow up to gh-18083 covering multi-line uses of `re.compile(..` and some cases for `re.match(..` with single (meta)character classes
* MAINT: Use numpy version for f2py version.Charles Harris2020-08-221-2/+0
| | | | | | Because f2py is released as part of numpy, the old svn versioning no longer makes sense and it was decided to use the numpy version instead.
* MAINT: remove useless `global` statementsEric Wieser2020-03-181-2/+0
| | | | | | | `global` is only needed if a variable appears on the left of an assignment. These variables do not. Most suffer from the misconception that `var[x] = y` requires `var` to be global, but it does not.
* Merge pull request #15706 from melissawm/f2py-typos-fixCharles Harris2020-03-081-1/+1
|\ | | | | MAINT: Fixing typos in f2py comments and code.
| * Fixing typos in f2py comments and code.Melissa Weber Mendonca2020-03-041-1/+1
| |
* | convert shebang from python to python3 (#15687)Changqing Li2020-03-041-1/+1
|/ | | | Signed-off-by: Changqing Li <changqing.li@windriver.com>
* MAINT: cleanup unused imports; avoid redefinition of importsMike Taves2020-02-061-1/+0
| | | | | | | * Cleanup unused imports (F401) of mostly standard Python modules, or some internal but unlikely referenced modules * Where internal imports are potentially used, mark with noqa * Avoid redefinition of imports (F811)
* MAINT: Remove sys.version checks (gh-#15373)Seth Troisi2020-01-281-5/+1
| | | More sys.version cleanup.
* MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-031-2/+0
| | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* Fix typos, via a Levenshtein-style correctorBrian Wignall2019-12-191-1/+1
|
* ENH: f2py: add --f2cmap option for specifying the name of .f2py_f2cmapPauli Virtanen2019-12-141-8/+20
| | | | | | | | | | | | | Previously, f2py loaded the type mappings from a file ``.f2py_f2cmap`` in current directory, at import time. Make the file name customizable by adding a ``--f2cmap`` command line option, and postpone loading the file to f2py.run_main(). Moreover, restore the default type mapping in f2py.run_main() before loading the customizations, so that multiple calls to f2py.run_main() do not interfere with each other. (For example, numpy.distutils calls f2py multiple times in the same process.)
* MAINT, TST: check for unreachable code pathsTyler Reddy2018-11-021-4/+1
| | | | | | | * use vulture to check for unreachable Python code paths in Azure CI * fix up an unreachable path in f2py/capi_maps.py
* DOC: fix minor typosUnknown2017-12-121-1/+1
|
* BUG: KeyboardInterrupt is swallowed all over the placeEric Wieser2017-06-031-2/+2
| | | | Bare except is very rarely the right thing
* MAINT: remove usage of NPY_CHAR from f2pyJulian Taylor2017-05-021-6/+3
|
* MAINT: Fix some typos in a code string and commentsDongjoon Hyun2016-01-271-1/+1
|
* MAINT: Dictionary litteralRémy Léone2015-11-071-4/+2
|
* BUG: Revert some import * fixes in f2py.Charles Harris2015-10-261-11/+5
| | | | | | | | | | | | | | | | The files * capi_maps.py * crackfortran.py * f90mod_rules.py previously used `from .auxfuncs import *` and also called `eval` without an explicit enviroment. An attempt to use explicit imports led to errors, and because static code analysis in not sufficient to determine what functions need to be imported, it is safest to continue using `import *` pending a major refactoring of f2py. Closes #6563.
* STY: Break some long lines in numpy/f2py/*.py.Charles Harris2015-07-291-21/+13
| | | | | | | The fixes are generated by autopep8, which uses line continuation. There are 441 cases that it is unable to handle, involving strings, and that is more, and more delicate, work than I want to do at this time. The line continuation characters at least mark some of the long lines.
* STY: Make PEP8 fixes in numpy/f2pyCharles Harris2015-07-251-418/+487
| | | | | Decided to bite the bullet on this one. The code is certainly more readable, so should be easier to fix if we need to.
* STY: Make pyflakes fixes in numpy/f2pyCharles Harris2015-07-251-1/+18
|
* BUG: Cannot read .f2py_f2cmaps under python 3.3David Powell2015-03-061-4/+4
| | | | | | | When reading .f2py_f2cmaps, these is iteration over dictionaries keys() and items(), which are iterators in python 3. This prohibits modifying the dicionaries while iterating. By wrapping these calls with list(), the python 2 behaviour is restored. Fixes #5637.
* STY: Giant comma spacing fixup.Charles Harris2013-08-181-157/+157
| | | | | | | Run the 2to3 ws_comma fixer on *.py files. Some lines are now too long and will need to be broken at some point. OTOH, some lines were already too long and need to be broken at some point. Now seems as good a time as any to do this with open PRs at a minimum.
* 2to3: Apply `repr` fixer.Charles Harris2013-04-081-13/+13
| | | | | | | | | | | | This replaces python backtics with repr(...). The backtics were mostly used to generate strings for printing with a string format and it is tempting to replace `'%s' % repr(x)` with `'%r' % x`. That would work except where `x` happened to be a tuple or a dictionary but, because it would be significant work to guarantee that and because there are not many places where backtics are used, the safe path is to let the repr replacements stand. Closes #3083.
* 2to3: apply `dict` fixer.Charles Harris2013-04-061-2/+2
| | | | | | | | | | | | | | | In Python3 `dict.items()`, `dict.keys()`, and `dict.values()` are iterators. This causes problems when a list is needed so the 2to3 fixer explicitly constructs a list when is finds on of those functions. However, that is usually not necessary, so a lot of the work here has been cleaning up those places where the fix is not needed. The big exception to that is the `numpy/f2py/crackfortran.py` file. The code there makes extensive use of loops that modify the contents of the dictionary being looped through, which raises an error. That together with the obscurity of the code in that file made it safest to let the `dict` fixer do its worst. Closes #3050.
* 2to3: Apply `print` fixer.Charles Harris2013-04-061-1/+1
| | | | | | | Add `print_function` to all `from __future__ import ...` statements and use the python3 print function syntax everywhere. Closes #3078.
* 2to3: Use absolute imports.Charles Harris2013-03-281-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new import `absolute_import` is added the `from __future__ import` statement and The 2to3 `import` fixer is run to make the imports compatible. There are several things that need to be dealt with to make this work. 1) Files meant to be run as scripts run in a different environment than files imported as part of a package, and so changes to those files need to be skipped. The affected script files are: * all setup.py files * numpy/core/code_generators/generate_umath.py * numpy/core/code_generators/generate_numpy_api.py * numpy/core/code_generators/generate_ufunc_api.py 2) Some imported modules are not available as they are created during the build process and consequently 2to3 is unable to handle them correctly. Files that import those modules need a bit of extra work. The affected files are: * core/__init__.py, * core/numeric.py, * core/_internal.py, * core/arrayprint.py, * core/fromnumeric.py, * numpy/__init__.py, * lib/npyio.py, * lib/function_base.py, * fft/fftpack.py, * random/__init__.py Closes #3172
* 2to3: Put `from __future__ import division in every python file.Charles Harris2013-03-011-0/+2
| | | | | | | | This should be harmless, as we already are division clean. However, placement of this import takes some care. In the future a script can be used to append new features without worry, at least until such time as it exceeds a single line. Having that ability will make it easier to deal with absolute imports and printing updates.
* 2to3: Use modern exception syntax.Charles Harris2013-02-261-1/+1
| | | | Example: except ValueError,msg: -> except ValueError as msg:
* ENH: f2py: generate docstrings in Numpy docstring formatPauli Virtanen2012-11-171-8/+8
|
* STY: f2py - replace macros in old_defines.h with new.Charles Harris2012-02-041-35/+35
|
* Fix assumed shape support for routines that use modules. Improved ↵Pearu Peterson2011-02-271-5/+6
| | | | .f2py_f2cmap messages.
* BUG: f2py: fix building modules via 'f2py -c' (broken in e6eafde)Pauli Virtanen2010-10-061-2/+4
|
* FEAT: add C module and f2py fortran wrapper output customization from ↵David Cournapeau2010-09-171-0/+2
| | | | command line.
* BUG: f2py: replace a string exception with a real one (fixes #1515)Pauli Virtanen2010-06-191-1/+2
|
* 3K: f2py: port much of f2py C code to Py3Pauli Virtanen2010-03-061-0/+6
|
* Disable 7712 patch.Pearu Peterson2009-11-101-1/+1
|
* f2py: fix a code generation bug when callback function is taking arguments ↵Pearu Peterson2009-11-091-1/+5
| | | | with the same symbol name.
* use 'in' keyword to test dictionary membershipJarrod Millman2007-11-281-48/+73
|
* typoJarrod Millman2007-10-291-1/+1
|
* using faster string methods rather than deprecated string moduleJarrod Millman2007-10-291-26/+28
|