| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
MAINT: Use with statement to open/close files to fix LGTM alerts
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
Don't touch the fortran files, since indentation is signficant there and it makes things more error-prone
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This fixes numpy.f2py.tests.test_kind.TestKind
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
BUG, DOC: test, fix that f2py.compile accepts str and bytes, rework docs
|
| | |
|
| |
| |
| |
| |
| | |
This is for the _selected_real_kind_func function in
f2py/crackfortran.py
|
|/
|
|
| |
Closes gh-12576
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#12448)
* Review F401,F841,F842 flake8 errors (unused variables, imports)
* Review comments
* More tests in test_installed_npymath_ini
* Review comments
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
* use vulture to check for unreachable Python
code paths in Azure CI
* fix up an unreachable path in f2py/capi_maps.py
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
TST: Parametrize f2py tests.
|
| |
| |
| |
| |
| | |
This allows to parametrize the entire class without having to do any
trickery with eval.
|
| | |
|
|\ \
| | |
| | | |
TST: prefer pytest.skip() over SkipTest
|
| | |
| | |
| | | |
`test_array_from_pyobj.py` needs to import pytest.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 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
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|/ /
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
| |
* replaced the usage of exec_command() in the
f2py init with standard library equivalent
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
User- and non-user-facing typos.
Some source typos fixes as well.
Found via `codespell`.
|
|
|
|
|
| |
That function is nose specific and has not worked since `__init__` files
were added to the tests directories.
|
|
|
|
|
|
|
|
| |
Numpy can now be tested using the standard
`python -c"import numpy; numpy.test()"`
construct.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The "bench" testing with the old bench files is no longer supported.
These days we use `runtests.py` and `asv`.
|
|
|
| |
Found via `codespell -q 3 -I ../numpy-whitelist.txt`
|
| |
|
| |
|
|
|
|
|
|
| |
Regression tests for bug discussed in pull request #10676.
Lines matching the multiline or f2py enhancement pattern should not be
split by ';'.
|
|
|
|
|
|
| |
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: 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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Found via `codespell -q 3 -I ../numpy-whitelist.txt`
Whitelist consists of:
```
amin
ans
behaviour
cancellation
dum
initialise
ith
nd
ot
splitted
writeable
```
.
|
|\
| |
| | |
MAINT: Use a StructSequence in place of the typeinfo tuples
|