Skip to content
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

Update Dask Array's FFT implementation to include norm keyword. #7409

Closed
theXYZT opened this issue Mar 16, 2021 · 1 comment
Closed

Update Dask Array's FFT implementation to include norm keyword. #7409

theXYZT opened this issue Mar 16, 2021 · 1 comment

Comments

@theXYZT
Copy link

theXYZT commented Mar 16, 2021

Numpy/Scipy FFT functions now accept a norm keyword for normalizing the output. Currently, dask.array's FFT implementation does not allow for this. It would be great to update Dask Array's implementation to match with the current Numpy/Scipy API.

Here's a snippet of what currently happens:

In [1]: import numpy as np

In [2]: import dask.array as da

In [3]: np.fft.fft(np.ones(8), norm='ortho')
Out[3]:
array([2.82842712+0.j, 0.        +0.j, 0.        +0.j, 0.        +0.j,
       0.        +0.j, 0.        +0.j, 0.        +0.j, 0.        +0.j])

In [4]: np.fft.fft(da.ones(8), norm='ortho')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-4-f57d26876801> in <module>
----> 1 np.fft.fft(da.ones(8), norm='ortho')

<__array_function__ internals> in fft(*args, **kwargs)

~\.conda\envs\main\lib\site-packages\dask\array\core.py in __array_function__(self, func, types, args, kwargs)
   1530         if da_func is func:
   1531             return handle_nonmatching_names(func, args, kwargs)
-> 1532         return da_func(*args, **kwargs)
   1533
   1534     @property

TypeError: func() got an unexpected keyword argument 'norm'
@theXYZT
Copy link
Author

theXYZT commented Mar 16, 2021

This was requested in #3280. I didn't see it in my search, my apologies. I'll close this issue now.

@theXYZT theXYZT closed this as completed Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant