-
Notifications
You must be signed in to change notification settings - Fork 28
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
Wrap fft for dask #139
Merged
Merged
Wrap fft for dask #139
Changes from all 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 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 |
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.
There's other similar skips in some of the lines below. We should probably consolidate. I don't know if there's a cleaner way to do it but if you are aware of one let me know!
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.
Ideally we would put these sorts of skips in the individual action files for each package, but I don't know if it's possible to do it.
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 think for now, it might be easier to keep it in here (even though it's less clean), since I don't think any of the other libraries need this Python restriction.
Assuming Python 3.9 gets dropped sometime soonish, it'd probably be easier to remove in this state.
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.
We should probably come up with a policy, but I've tried to be very conservative in supporting old versions to make it so this package is as easy for people to adopt as possible. So I don't have immediate plans to drop Python 3.9, although we will obviously want to do so at some point especially as all the wrapped packages stop supporting it.