-
Notifications
You must be signed in to change notification settings - Fork 33
Wrap fft for dask #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Wrap fft for dask #139
Changes from 6 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
035969e
Wrap fft for dask
lithomas1 8222d19
try numpy 2.0rc2
lithomas1 bd9b01f
test newer dask
lithomas1 c6aff83
Merge branch 'dask-fft' of github.com:lithomas1/array-api-compat into…
lithomas1 1f14ba9
remove stale condition
lithomas1 db22d63
try drop 3.9?
lithomas1 1e79b84
actually wrap properly
lithomas1 1856ec7
add wrappers for only fftfreq
lithomas1 b6f4cf8
try to fix all?
lithomas1 3ad4af2
Merge branch 'main' into dask-fft
lithomas1 ec6dcc4
fix dask.array for real this time
lithomas1 f9887b4
Merge branch 'dask-fft' of github.com:lithomas1/array-api-compat into…
lithomas1 11a92fe
fixup comment
lithomas1 2c4502f
add back missing dtypes
lithomas1 984f052
add all dtypes back
lithomas1 91ffaaf
fix all
lithomas1 9e85384
Merge branch 'main' of github.com:data-apis/array-api-compat into das…
lithomas1 de0a735
fix __all__
lithomas1 54d7c74
add lower bound for dask
lithomas1 25ede3b
drop 3.9
lithomas1 884b610
try using fromjson
lithomas1 2182b4f
update comment
lithomas1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,29 @@ | ||
from dask.array.fft import * # noqa: F403 | ||
from numpy.fft import __all__ as fft_all | ||
|
||
from ..common import _fft | ||
from .._internal import get_xp | ||
|
||
import dask.array as da | ||
|
||
fft = get_xp(da)(_fft.fft) | ||
ifft = get_xp(da)(_fft.ifft) | ||
fftn = get_xp(da)(_fft.fftn) | ||
ifftn = get_xp(da)(_fft.ifftn) | ||
rfft = get_xp(da)(_fft.rfft) | ||
irfft = get_xp(da)(_fft.irfft) | ||
rfftn = get_xp(da)(_fft.rfftn) | ||
irfftn = get_xp(da)(_fft.irfftn) | ||
hfft = get_xp(da)(_fft.hfft) | ||
ihfft = get_xp(da)(_fft.ihfft) | ||
fftfreq = get_xp(da)(_fft.fftfreq) | ||
rfftfreq = get_xp(da)(_fft.rfftfreq) | ||
fftshift = get_xp(da)(_fft.fftshift) | ||
ifftshift = get_xp(da)(_fft.ifftshift) | ||
|
||
__all__ = fft_all + _fft.__all__ | ||
|
||
del get_xp | ||
del da | ||
del fft_all | ||
del _fft |
This file contains hidden or 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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe array-api-tests is using a typing feature (|) from Python 3.10, which is causing us to fail here.
Not sure if it's worth patching there, as NEP29 says 3.9 should be dropped anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be fixed upstream now. Let's keep 3.9 support for now. We should discuss dropping Python support in another issue. I'd prefer to be as conservative as possible with supported Python versions (i.e., not drop support unless we really need to), to maximize compatibility for people.