summaryrefslogtreecommitdiff
path: root/numpy/f2py
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #13499 from Bharat123rox/file-closingEric Wieser2019-05-122-58/+53
|\ | | | | MAINT: Use with statement to open/close files to fix LGTM alerts
| * Add code review suggestions from @eric-wieserBharat123rox2019-05-081-2/+3
| |
| * Fixed possible regressionsBharat123rox2019-05-081-2/+2
| |
| * Use with statement to open/close files to fix LGTM alertsBharat123rox2019-05-072-60/+54
| |
* | BUG: blindly add TypeError to accepted exceptionsmattip2019-04-301-1/+1
|/
* TEST: update for PyPymattip2019-04-171-1/+2
|
* MAINT: Use textwrap.dedent in f2py testsEric Wieser2019-04-103-43/+42
| | | | Don't touch the fortran files, since indentation is signficant there and it makes things more error-prone
* MAINT: f2py: Add a cast to avoid a compiler warning.Warren Weckesser2019-04-051-1/+1
| | | | | | | | | | | | | The warning [...]/fortranobject.c:138:18: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and 'unsigned long' [-Wsign-compare] if (size < sizeof(notalloc)) { ~~~~ ^ ~~~~~~~~~~~~~~~~ occurs 17 times when scipy is built. The change in this pull request casts `size` to `size_t` before comparing it to `sizeof(...)`. A previous check has already eliminated the possibility that `size` is negative, so this cast is safe.
* BUG: ppc and riscv don't use REAL(10)Andreas Schwab2019-03-051-1/+1
| | | | This fixes numpy.f2py.tests.test_kind.TestKind
* BUG: Fix testing of f2py.compile from strings.Charles Harris2019-01-202-14/+17
| | | | | | | The test should not be run if there is no Fortran compiler. This PR moves it to `numpy/f2py/tests/test_compile_function.py`, which is appropriate for the test and a place where the presence of the needed compilers is already checked for.
* Merge pull request #12807 from mattip/f2py-source-bytesCharles Harris2019-01-203-5/+52
|\ | | | | BUG, DOC: test, fix that f2py.compile accepts str and bytes, rework docs
| * BUG, DOC: test, fix that f2py.compile accepts str and bytes, rework docsmattip2019-01-203-5/+52
| |
* | BUG: Add 'sparc' to platforms implementing 16 byte reals.Charles Harris2019-01-051-1/+1
| | | | | | | | | | This is for the _selected_real_kind_func function in f2py/crackfortran.py
* | BUG: fix f2py pep338 execution methodJulian Taylor2018-12-171-1/+1
|/ | | | Closes gh-12576
* MAINT: Review F401,F841,F842 flake8 errors (unused variables and imports) ↵Roman Yurchak2018-12-065-10/+1
| | | | | | | | | | | | (#12448) * Review F401,F841,F842 flake8 errors (unused variables, imports) * Review comments * More tests in test_installed_npymath_ini * Review comments
* MAINT: Use list and dict comprehension when possible (#12445)Roman Yurchak2018-12-012-17/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use list comprehension * More list comprehension migration * Revert key copying in dict * A few more fixes * More reverts * Use dict comprehension * Fix dict comprehension * Address review comments * More review comments * Fix for empty unpacking of zip(* * Revert zip(* unpacking altogether * Fix dict copying * More simplifications
* 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
* MAINT: removed unused vars in f2py test codeTyler Reddy2018-10-291-2/+0
|
* TST, MAINT: Skip some f2py tests on Mac.Charles Harris2018-10-072-4/+15
| | | | | | There is a not yet understood problem in testing f2py C modules (*.pyf) files on the Mac that manifests as erratic module import failures.' This disables those tests until we can figure out what the problem is.
* MAINT: remove unused stdlib importsEmil Hessman2018-09-301-4/+0
|
* MAINT: don't call function with too many argumentsEmil Hessman2018-09-301-2/+2
|
* TST: add macos azure testing to CI.Tyler Reddy2018-09-281-0/+7
|
* MAINT: remove duplicate importsmattip2018-09-261-2/+0
|
* Merge pull request #11894 from QuLogic/f2py-test-parametrizeCharles Harris2018-09-227-47/+48
|\ | | | | TST: Parametrize f2py tests.
| * TST: Use fixture around f2py shared memory tests.Elliott Sales de Andrade2018-09-061-11/+9
| | | | | | | | | | This allows to parametrize the entire class without having to do any trickery with eval.
| * TST: Parametrize f2py tests.Elliott Sales de Andrade2018-09-066-36/+39
| |
* | Merge pull request #12014 from tylerjereddy/issue_12013_pytest_skipCharles Harris2018-09-212-7/+8
|\ \ | | | | | | TST: prefer pytest.skip() over SkipTest
| * | BUG: Fix missing pytest import.Charles Harris2018-09-211-0/+1
| | | | | | | | | `test_array_from_pyobj.py` needs to import pytest.
| * | TST: prefer pytest.skip() over SkipTestTyler Reddy2018-09-212-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * replace most usage of SkipTest() with pytest.skip() * where possible, we avoid use of the standard library SkipTest because unittest skipping is routed through the pytest nose compatibility layer in that scenario, which can prevent an easy trace back to the test line where the skip occurred
* | | BUG: Fix f2py test_compile_function.py tests.Charles Harris2018-09-211-74/+61
| | | | | | | | | | | | | | | | | | The tests were failing on platforms without a fortran compiler as that was not being checked for. Add that check among others and clean up the test functions a bit.
* | | TST, MAINT: Separate f2py compile function testing into own fileCharles Harris2018-09-202-105/+125
|/ / | | | | | | | | | | | | Create new file `test_compile_function.py` for the test, transferring the content from `test_quoted_characters.py` where it was before. The tricky part here is maintaining the history in both files after the move.
* | MAINT: remove exec_command() from f2py initTyler Reddy2018-09-182-11/+152
|/ | | | | * replaced the usage of exec_command() in the f2py init with standard library equivalent
* ENH: Use entry_points to install the f2py scripts.Charles Harris2018-08-233-74/+25
| | | | | | | | | | | | | | | | | | | | | This adds entry_points for the f2py scripts. The installed scripts differ between Windows and other environments. * On Windows, the only script installed is 'f2py'. This works well in that environment because each Python version is installed in its own directory, making it easy to keep the differing script versions separate. * Otherwise, three scripts are installed, 'f2py', 'f2py' + 'minor', and 'f2py' + 'major.minor'. For instance, if Numpy is installed by Python 2.7, then the installed scripts will be named 'f2py', 'f2py2', and 'f2py2.7'. That naming scheme is used for back compatibility, and also so that more than one Python version can be dealt with in a way common to many Linux distros. Note that 'f2py' will always point to the latest install and 'f2py(2|3)' to the latest Python (2|3) install The script tests have been modified to check for the new environment and the code previously used to install the scripts has been removed.
* Fix Fortran kind detection for aarch64 & s390x.Elliott Sales de Andrade2018-08-121-1/+1
|
* MAINT: Move pytesttester outside of np.testing, to avoid creating ↵Eric Wieser2018-07-021-1/+1
| | | | | | | | unnecessary import dependencies pytesttester is used by every single subpackage, so making it depend on np.testing just creates cyclic dependencies that can lead to circular imports Relates to #11457
* HTTP -> HTTPS, and other linkrot fixesMike Toews2018-06-161-1/+1
|
* MAINT: Misc. typos (#11005)luzpaz2018-04-301-1/+1
| | | | | | | | | User- and non-user-facing typos. Some source typos fixes as well. Found via `codespell`.
* MAINT: Remove all uses of run_module_suite.Charles Harris2018-04-0617-77/+19
| | | | | That function is nose specific and has not worked since `__init__` files were added to the tests directories.
* TST: Update modules `test` to PytestTester.Charles Harris2018-04-041-2/+3
| | | | | | | | Numpy can now be tested using the standard `python -c"import numpy; numpy.test()"` construct.
* TST: Switch to using pytest markersCharles Harris2018-04-0417-61/+88
| | | | | | | | | | | Use standard pytest markers everywhere in the numpy tests. At this point there should be no nose dependency. However, nose is required to test the legacy decorators if so desired. At this point, numpy test cannot be run in the way with runtests, rather installed numpy can be tested with `pytest --pyargs numpy` as long as that is not run from the repo. Run it from the tools directory or some such.
* MAINT: Remove "bench" from testing modules `__init__`s.Charles Harris2018-03-311-1/+0
| | | | | The "bench" testing with the old bench files is no longer supported. These days we use `runtests.py` and `asv`.
* DOC: Fix minor typosluz.paz2018-03-301-1/+1
| | | Found via `codespell -q 3 -I ../numpy-whitelist.txt`
* MAINT: Fixed C++ guard in f2py test.siavashserver2018-03-091-2/+2
|
* MAINT: Hard tab and whitespace cleanup.Charles Harris2018-03-084-74/+75
|
* TST: test handling ';' in multiline and enhancement lines, numpy.f2pyBob Eldering2018-03-081-0/+53
| | | | | | Regression tests for bug discussed in pull request #10676. Lines matching the multiline or f2py enhancement pattern should not be split by ';'.
* BUG: fix for splitting a multiline or enhancement by ';' in numpy.f2py.Bob Eldering2018-03-081-2/+3
| | | | | | The variable line was assigned to before checking whether it contains a multiline or f2py enhancement pattern. In these cases the line should not be split by ';'. See pull request #10676.
* BUG: F2py mishandles quoted control characters (#10676)bobeldering2018-03-042-37/+79
| | | | | | | | | | | | | | | | | * BUG: improve parsing of quoted control characters in numpy.f2py. See #10634. Fixes a couple of cases where quoted control characters are parsed as if they are unquoted. The control characters considered are "()!;". * TST: quoted characters parsing by numpy.f2py. Basic test of parsing quoted Fortran control characters. See #10634. * BUG: add missing space character when reconstructing fortran line. The missing space caused a line starting with "!f2py" to be considered a continuation line.
* BUG: f2py: fix f2py generated code to work on PypyPauli Virtanen2018-02-241-5/+25
| | | | | | | | F2py generates code that uses PyTuple_SetItem on a tuple that has been "used", which is invalid on Pypy. Add #ifdefs that make the generated code convert the object to a list, use PyList_SetItem, and then convert it back to a tuple.
* Misc. typosluz.paz2018-02-161-1/+1
| | | | | | | | | | | | | | | | | | | Found via `codespell -q 3 -I ../numpy-whitelist.txt` Whitelist consists of: ``` amin ans behaviour cancellation dum initialise ith nd ot splitted writeable ``` .
* Merge pull request #10154 from eric-wieser/fixup-numerictypesCharles Harris2018-01-041-11/+12
|\ | | | | MAINT: Use a StructSequence in place of the typeinfo tuples