| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
The type stubs incorrectly mark this argument as mandatory.
|
|
|
|
|
| |
Using maxdims for this is the typical pattern in NumPy and avoids the
malloc call.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| | |
ENH, CI: Add Emscripten to CI
|
| | |
|
|/
|
|
|
| |
This saves doing an expensive configure-time check that does
not seem needed.
|
|
|
|
| |
i.e. `numpy.typing` and `numpy._typing`
|
|
|
|
| |
Represents a subset of `npt.ArrayLike` that can be parametrized w.r.t. `np.generic`
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
DOC: added examples section for rfft2 and irfft2 docstring
|
| |
| |
| |
| |
| | |
Update rfft2 example to conform to fft2 example and switch the irfft2
example to illustrate round-tripping.
|
| | |
|
| | |
|
|\ \
| | |
| | | |
ENH: Add placeholder stubs for all sub-modules
|
| | | |
|
| |/ |
|
|/
|
|
| |
Some more Python 2 cleanup
|
|
|
|
|
|
| |
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
* DOC: Update see also link with rfft
|
|\
| |
| | |
BUG: Remove non-threadsafe sigint handling from fft calculation
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
| |
Add missing closing brackets, script to generate the list in the PR gh-16051.
|
|
|
| |
AIX needs to be told to use large file support at all times. Fixes parts of gh-15801.
|
|
|
|
|
|
|
|
| |
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.
|