-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #139 from lithomas1/dask-fft
Wrap fft for dask
- Loading branch information
Showing
6 changed files
with
41 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
__array_api_version__ = '2022.12' | ||
|
||
__import__(__package__ + '.linalg') | ||
__import__(__package__ + '.fft') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from dask.array.fft import * # noqa: F403 | ||
# dask.array.fft doesn't have __all__. If it is added, replace this with | ||
# | ||
# from dask.array.fft import __all__ as linalg_all | ||
_n = {} | ||
exec('from dask.array.fft import *', _n) | ||
del _n['__builtins__'] | ||
fft_all = list(_n) | ||
del _n | ||
|
||
from ...common import _fft | ||
from ..._internal import get_xp | ||
|
||
import dask.array as da | ||
|
||
fftfreq = get_xp(da)(_fft.fftfreq) | ||
rfftfreq = get_xp(da)(_fft.rfftfreq) | ||
|
||
__all__ = [elem for elem in fft_all if elem != "annotations"] + ["fftfreq", "rfftfreq"] | ||
|
||
del get_xp | ||
del da | ||
del fft_all | ||
del _fft |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,2 @@ | ||
# FFT isn't conformant | ||
array_api_tests/test_fft.py | ||
array_api_tests/test_signatures.py::test_extension_func_signature[fft.fft] | ||
array_api_tests/test_signatures.py::test_extension_func_signature[fft.ifft] | ||
array_api_tests/test_signatures.py::test_extension_func_signature[fft.fftn] | ||
array_api_tests/test_signatures.py::test_extension_func_signature[fft.ifftn] | ||
array_api_tests/test_signatures.py::test_extension_func_signature[fft.rfft] | ||
array_api_tests/test_signatures.py::test_extension_func_signature[fft.irfft] | ||
array_api_tests/test_signatures.py::test_extension_func_signature[fft.rfftn] | ||
array_api_tests/test_signatures.py::test_extension_func_signature[fft.irfftn] | ||
array_api_tests/test_signatures.py::test_extension_func_signature[fft.hfft] | ||
array_api_tests/test_signatures.py::test_extension_func_signature[fft.ihfft] | ||
array_api_tests/test_signatures.py::test_extension_func_signature[fft.fftfreq] | ||
array_api_tests/test_signatures.py::test_extension_func_signature[fft.rfftfreq] | ||
|
||
# slow and not implemented in dask | ||
array_api_tests/test_linalg.py::test_matrix_power |