summaryrefslogtreecommitdiff
path: root/numpy/fft
Commit message (Collapse)AuthorAgeFilesLines
* Mark `d` argument to fftfreq and rfftfreq as optional in type stubs.Peter Hawkins2023-03-031-4/+4
| | | | The type stubs incorrectly mark this argument as mandatory.
* MAINT: Simplify temporary dimensions by using static arraySebastian Berg2023-02-211-4/+2
| | | | | Using maxdims for this is the typical pattern in NumPy and avoids the malloc call.
* MAINT: Ensure malloc(0) is not called in pocketfft.cSebastian Berg2023-02-211-6/+9
|
* BLD: enable building NumPy with MesonRalf Gommers2022-11-251-0/+33
| | | | | | | | | | | | | | | | | | | This enables building with NumPy on Linux and macOS. Windows support should be complete to, but is untested as of now and may need a few tweaks. This contains: - A set of `meson.build` files and related code generation script tweaks, header templates, etc. - One CI job on Linux - Basic docs on using Meson to build NumPy (not yet integrated in the html docs, it's too early for that - this is for early adopters right now). The build should be complete, with the major exception of SIMD support. The full test suite passes. See gh-22546 for the tracking issue with detailed notes on the plan for switching NumPy to Meson as its build system. Co-authored-by: Stefan van der Walt <stefanv@berkeley.edu>
* Merge pull request #21895 from hoodmane/emscripten-ciRalf Gommers2022-11-151-1/+2
|\ | | | | ENH, CI: Add Emscripten to CI
| * TST: Skip tests that are not currently supported in wasmHood Chatham2022-11-111-1/+2
| |
* | MAINT: remove `NPY_RESTRICT` in favor of C99 `restrict`Ralf Gommers2022-11-121-2/+0
|/ | | | | This saves doing an expensive configure-time check that does not seem needed.
* MAINT: Split `numpy.typing` into a public and private componentBas van Beek2022-03-182-2/+2
| | | | i.e. `numpy.typing` and `numpy._typing`
* MAINT: Create the `_ArrayLike` type-alias in `numpy.typing`Bas van Beek2022-01-241-5/+2
| | | | Represents a subset of `npt.ArrayLike` that can be parametrized w.r.t. `np.generic`
* STY: Use subscriptable `collections.abc` types over the generic aliases in …Bas van Beek2021-12-231-4/+2
|
* STY: Use subscriptable `builtins` types over the generic aliases in `typing`Bas van Beek2021-12-233-8/+5
|
* ENH: Add annotations for `np.fft`Bas van Beek2021-11-023-19/+185
|
* STY: Small cleanups of includes in *.c files.Charles Harris2021-09-031-1/+2
| | | | | | | | | | | | | | | | This puts the following numpy defines at the top of the files before the includes. define NPY_NO_DEPRECATED_API NPY_API_VERSION define _MULTIARRAYMODULE define _UMATHMODULE There are also minor cleanups of <...> vs "..." include styles together with a small fix to the .clang-format file to include "pymem.h" among the Python supplied headers. Further cleanups will follow if clang-format is used on the files but that is not done here.
* MAIN: Minor include rationalization.Charles Harris2021-09-031-3/+4
| | | | | | | - Replace "Python.h" by <Python.h> - Replace "structmember.h" by <structmember.h> - Replace <npy_config> by "npy_config" - Define PY_SSIZE_T_CLEAN before all Python.h includes in .c files.
* index_tricks.py file not modifiedshubham119411402021-08-191-1/+1
|
* ENH: Add `__path__` annotations to all sub-packagesBas van Beek2021-07-251-0/+1
|
* ENH: Add annotations for `<module>.test` objectsBas van Beek2021-07-251-0/+3
|
* ENH: Add improved placeholder annotations for `np.fft`Bas van Beek2021-04-231-18/+18
|
* ENH: Add `__all__` to a number of public modulesBas van Beek2021-04-152-1/+7
|
* DOC: Update some plotting code to current Matplotlib idiomsTim Hoffmann2021-03-211-3/+5
| | | | | | | | | - 3D Axes are created via add_subplot(projection='3d') - There is now a `stairs()` function that's specifically designed for showing histogram curves - Labels should be passed as keyword arguments to the plot functions instead of to `legend()`, which reduces the risk of mixing them up. - ensure equal axis scaling in the meshgrid example
* MAINT: Added Chain exceptions where appropriate (#18400)Abhay Raghuvanshi2021-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Added chain exception in _pocketfft.py * Added chain exception in format.py * Added chain exception in make_lite.py * Added chain exception in mrecords.py * added from e for exceptions * Minor update for _read_array_header exception msg * Removed \n from excp msg and e from msg format. Co-authored-by: Eric Wieser <wieser.eric@gmail.com> * Update numpy/linalg/lapack_lite/make_lite.py Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
* DOC: Parameter name typo axes -> axis in numpy.fft._pocketfft.Matthias Bussonnier2020-12-181-5/+5
| | | | | | | | | | The parameter name seem to have a typo in both those case and reference axis (and not axes), this is likely due to copy-past as some other functions in this modules use axes (when several indices are required), but other also use `axis` and have the correct spelling. From review it also seem like previous phrasing is unclear so update all similar entries to reflect the new phrasing.
* Merge pull request #16818 from rohitsanj/examples-rfft2-irfft2Charles Harris2020-12-151-0/+19
|\ | | | | DOC: added examples section for rfft2 and irfft2 docstring
| * DOC: update rfft2/irfft2 examples.Ross Barnowski2020-08-171-12/+14
| | | | | | | | | | Update rfft2 example to conform to fft2 example and switch the irfft2 example to illustrate round-tripping.
| * DOC: added examples for rfft2 and irfft2 docstringRohit Sanjay2020-08-171-0/+17
| |
* | BUG: Fixed an issue where `.pyi` weren't picked up by numpy sub-packagesBas van Beek2020-11-031-0/+1
| |
* | Merge pull request #17104 from BvB93/sub-modulesCharles Harris2020-09-071-0/+20
|\ \ | | | | | | ENH: Add placeholder stubs for all sub-modules
| * | ENH: Replace module-level `__getattr__` with explicitly defined objectsBas van Beek2020-08-201-2/+18
| | |
| * | ENH: Add placeholder stubs for all sub-modulesBas van Beek2020-08-191-0/+4
| |/
* | MAINT: Remove users of `numpy.compat.integer_types`Eric Wieser2020-08-312-5/+3
|/ | | | Some more Python 2 cleanup
* DOC: Disclaimer for FFT libraryBen Nathanson2020-08-091-0/+3
| | | | | | Adds sentence to the top of routines.fft.html explaining that scipy.fft is a more comprehensive collection, per mailing list discussion (http://numpy-discussion.10968.n7.nabble.com/Add-Chebyshev-cosine-transforms-implemented-via-FFTs-td48373.html#a48382)
* DOC: Clarify input to irfft/irfft2/irfftn (#16950)Bharat Raghunathan2020-07-291-3/+7
| | | | * DOC: Clarify input to irfft/irfft2/irfftn * DOC: Update see also link with rfft
* Merge pull request #16532 from seberg/delete-sigint-handlingMatti Picus2020-07-171-6/+0
|\ | | | | BUG: Remove non-threadsafe sigint handling from fft calculation
| * BUG: Remove non-threadsafe sigint handling from fft calculationSebastian Berg2020-06-251-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fft calculation is the only point in our code where this function is used. Allowing Ctrl+C, in FFT specifically used have more reasons, since before pocketfft, some array-sizes could lead to very large run-times. Pocketfft fixed that issue, and now FFT is not really any slower, faster, or memory hungry than any other NumPy operation so it feels it does not need this handling. Rather, if we can find a better solution, it should also be added to more functions. The reason for removal is that it is not only unsafe while the FFT is running (in theory). Multiple, threaded FFT run can easily leave the signal handler in a bad state, causing crashes if Ctrl+C (sigint) is given at any point after the call. It would be possible to patch that over, by only resetting the signal handler if we actually changed it (or even more complex tricks), or possibly only using this technique when on the main thread. But, all of these solutions seem to complicate things, when the main reason for why allowing sigint seems useful is gone with pocketfft.
* | ENH: add `norm=forward,backward` to numpy.fft functions (#16476)Chris Vavaliaris2020-07-123-106/+259
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kwarg option norm=inverse leads to scaling of the transforms inverse (opposite) to that of the default option norm=None; i.e. the forward transform is normalized with 1/n whereas the backward one with 1. The fft routines and their tests have been modified to reflect the changes; all tests have been passed successfully. Closes #16126 * modified _unitary, fft & ifft and their tests; tests passed * modified rfft & irfft and their tests; tests passed * modified hfft & ihfft and all tests; all modifications are now done * correction in ihfft; all 79 fft tests passed successfully * undo unnecessary docstrings changes made in my previous commits * use norm=forward kwarg value name * Update numpy/fft/__init__.py Co-authored-by: Leo Fang <leofang@bnl.gov> * add code review suggestions Co-authored-by: Leo Fang <leofang@bnl.gov> * add default norm=None alias norm=backward * streamline private normalization functions * modify hermitian FFTs * add review suggestions Co-authored-by: Leo Fang <leofang@bnl.gov> * add review suggestions v2 (dict as module const) * make review suggestions v3 * Apply suggestions from code review Co-authored-by: Leo Fang <leofang@bnl.gov>
* Mark tests as a subpackage rather than data.Hameer Abbasi2020-05-061-1/+1
|
* DOC: Add missing bracket (gh-16051)Chunlin2020-04-251-4/+4
| | | Add missing closing brackets, script to generate the list in the PR gh-16051.
* BUG: Add _LARGE_FILES to def_macros[] when platform is AIX (gh-15938)Michael Felt2020-04-221-1/+5
| | | AIX needs to be told to use large file support at all times. Fixes parts of gh-15801.
* MAINT: Pull identical line out of conditional.Ross Barnowski2020-02-221-2/+1
| | | | | | | | There was an identical statement in both possible branches of a conditional. Moved statement out of conditional to eliminate one repititious LOC
* MAINT: cleanup unused imports; avoid redefinition of importsMike Taves2020-02-062-2/+1
| | | | | | | * 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)
* BLD: use 0.3.7 release version, add dependency on libgfortran5mattip2020-01-171-5/+5
|
* MAINT: Remove sys.version checks in testsSeth Troisi2020-01-151-4/+1
|
* MAINT: Remove implicit inheritance from object class (#15236)Jon Dufresne2020-01-052-7/+7
| | | | | | | 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.
* Merge pull request #14376 from jdufresne/futureSebastian Berg2020-01-036-11/+0
|\ | | | | MAINT: Remove unnecessary 'from __future__ import ...' statements
| * MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-036-11/+0
| | | | | | | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* | MAINT: Remove Python2 specific C module setup (gh-15231)Seth Troisi2020-01-031-19/+2
|/ | | | | 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 (#14912)Daniel Ching2019-11-151-0/+8
| | | | | | | * 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
* DOC: remove note about Pocketfft license file (non-existing here).Ralf Gommers2019-09-201-5/+0
| | | | | | | | | 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]
* MAINT: clean up numpy/fft/info.pyRalf Gommers2019-09-072-190/+185
|
* MAINT: move pocketfft .py/.so to `_pocketfft`Ralf Gommers2019-09-074-8/+8
| | | | These aren't public, and should have been added with underscores.