| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\
| |
| |
| | |
Test, fix for missing end words in fortran subroutines and functions.
Fixes gh-14625
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Note that since we now need `npy_3kcompat.h`, we can delete all duplicated lines in this file
We preserve the original exception type for compatibility with old code here.
|
|/
|
|
|
|
| |
I just got this error while hacking some scipy internals, and had nowhere near enough information to debug it.
This is a little closer to useful.
|
|\
| |
| | |
BUG: General fixes to f2py reference counts (dereferencing)
|
| |
| |
| |
| |
| |
| |
| |
| | |
Note that the extension module dict seems to be never dereferenced
(there is an additional reference to it kept around somewhere).
This reference seems to part of the C python module loading
(possibly intentionally), and I could not find how to remove it or
where it originates from.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
A BytesWarning can be emitted when bytes are and strings are mismatched.
Catching BytesWarning ensures a better boundary between str and bytes
type. The test suite is now run with the -b flag to emit this warning.
Fixes #9308
|
|/ |
|
|
|
|
|
|
| |
Using `PyMem_Del` is incorrect, it should be `PyObject_Del` here, while
this worked most of the time, it would lead to crashes at least on python
2.5 (after the reference counts were fixed)
|
| |
|
|
|
|
| |
pip will itself call setup.py install with the rights options.
|
|\
| |
| | |
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
|
| |
|