| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
There was an identical statement in both possible branches of
a conditional.
Moved statement out of conditional to eliminate one
repititious LOC
|
|
|
|
|
|
|
| |
* 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)
|
| |
|
| |
|
|
|
|
|
|
|
| |
Inheriting from object was necessary for Python 2 compatibility to use
new-style classes. In Python 3, this is unnecessary as there are no
old-style classes.
Dropping the object is more idiomatic Python.
|
|\
| |
| | |
MAINT: Remove unnecessary 'from __future__ import ...' statements
|
| |
| |
| |
| |
| | |
As numpy is Python 3 only, these import statements are now unnecessary
and don't alter runtime behavior.
|
|/
|
|
|
| |
Dropping the support for python 2, the difference in module setup do not have to be accounted
for anymore. This removes the macros and ifdef's related to module setup code and python 2
support.
|
|
|
|
|
|
|
| |
* DOC: Note FFT type promotion
The NumPy FFT implementation will promote `float32` types to `float64` types. This may not be desired for some applications, but the SciPy implementation supports more data types.
Closes #14892
|
|
|
|
|
|
|
|
|
| |
Closes gh-14552
The Pocketfft author (mreineck) agreed on gh-14552 that Pocketfft can
simply fall under the NumPy license, no separate license file needed.
[ci skip]
|
| |
|
|
|
|
| |
These aren't public, and should have been added with underscores.
|
|
|
|
|
|
|
|
| |
* introduce inv_fct to avoid divisions by zero
* add comment describing the purpose of inv_fct
* inv_fct -> inv_norm
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Relaxed test_fft_with_order for float32.
Infinity norm round-off error of FFT is shown in
G.U. Ramos, "Roundoff Error Analyss of the Fast Fourier Transform,"
Mathematics of Computation, vol. 25, no. 116, Oct. 1971, p. 757
to be bounded by sqrt(N)*K*eps.
|
| |
|
|
|
|
|
| |
Test for ND transforms with axes for invariance of
permutation of axes.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
tweak and add test
better fix
fix
cleanup, additional test
fix test
|
|
|
|
|
|
| |
* as requested by review in gh-12634,
the vast majority of docstring matplotlib
imports can be simplified to a single line
|
|
|
|
|
|
|
| |
* there is no longer any usage of "agg"
backend switching in our docstrings because
this backend is already activated in
the refguide_check machinery
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* ported the refguide_check module from SciPy for usage
in NumPy docstring execution/ verification; added the
refguide_check run to Azure Mac OS CI
* adjusted NumPy docstrings such that refguide_check passes
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes GH-12271
Tests verify that everything in ``dir(numpy)`` either has ``__module__`` set to
``'numpy'``, or appears in an explicit whitelist of undocumented functions and
exported bulitins. These should eventually be documented or removed.
I also identified a handful of functions for which I had accidentally not setup
dispatch for with ``__array_function__`` before, because they were listed under
"ndarray methods" in ``_add_newdocs.py``. I guess that should be a lesson in
trusting code comments :).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ENH: __array_function__ support for np.fft and np.linalg
xref GH12028
* CLN: remove unnecessary dispatcher functions from np.linalg
* CLN: remove more unneeded dispatchers
* CLN: remove repeated dispatchers from np.linalg
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| | |
BUG: Return NULL from PyInit_* when exception is raised
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I don't think this is documented anywhere, but I'm pretty sure module init
functions should return NULL in order to communicate that an exception
occurred during initialization (as is the standard Python/C API convention).
It's clear from the CPython code
[here](https://github.com/python/cpython/blob/master/Python/importdl.c#L162)
that if you don't return NULL, the exception is swallowed and replaced with the
message "initialization of %s raised unreported exception".
Admittedly, this is only useful for people porting Numpy to new platforms where
it is helpful to know where module initialization is failing, but it can't hurt.
|
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
The "bench" testing with the old bench files is no longer supported.
These days we use `runtests.py` and `asv`.
|
|/ |
|
|\
| |
| | |
MAINT: Stop using non-tuple indices internally
|
| |
| |
| |
| |
| |
| | |
By not using this type of indexing, it becomes easier for subclasses to override indexing in a way that works correctly with numpy functions.
These locations were found by deprecating the behavior in question, which is deliberately not part of this commit
|
|/
|
|
|
|
| |
Previously, the numerical constants in the FFT code were not provided at full double precision which led to a loss of accuracy in the FFT operation. Additionally
this commit improves the accuracy of the twiddle factor calculation by reducing the argument of exp(2j*pi*m/n) to the first octant before calling the library
function. On average the commit lowers the remaining numerical error in the FFT by a factor of ten.
|
|
|
|
|
|
| |
(#10073)
See the PR for benchmarking information
|
|
|
|
|
|
|
|
| |
This allows pytest to run with duplicate test file names. Note that
`python <path-to-test-file>` no longer works with this change, nor will
a simple `pytest numpy`, because numpy is imported from the numpy
repository. However, `python runtests.py` and `>>> numpy.test()` are
still available.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The aim here is to separate out the nose dependent files prior to adding
pytest support. This could be done by adding new files to the general
numpy/testing directory, but I felt that it was to have the relevant
files separated out as it makes it easier to completely remove nose
dependencies when needed.
Many places were accessing submodules in numpy/testing directly, and in
some cases incorrectly. That presented a backwards compatibility
problem. The solution adapted here is to have "dummy" files whose
contents will depend on whether of not pytest is active. That way the
module looks the same as before from the outside.
In the case of numpy itself, direct accesses have been fixed. Having
proper `__all__` lists in the submodules helped in that.
|
|
|
|
|
|
|
| |
Performed using the following regex, replacing with $0:$1. Some manual cleanup
was then required.
^[a-z]+_(\w+)(?:(?!\}).*\n)+.*PyArg_ParseTuple(AndKeywords)?\(args[^"]+"[^:"]+(?=")
|
| |
|
| |
|
|
|
|
| |
closes #8444
|