Skip to content

Commit

Permalink
fix(accessors): FFT method was throwing error due to data being a chu…
Browse files Browse the repository at this point in the history
…nked Dask array
  • Loading branch information
mtrocadomoreira committed Jan 24, 2025
1 parent 8db89b9 commit 83329ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ozzy/accessors.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ def _fft(da: xr.DataArray, axes=None, dims: list[str] | None = None, **kwargs):

# Calculate FFT

fftdata = abs(np.fft.fftshift(np.fft.fftn(da.data, axes=axes, **kwargs), axes=axes))
fftdata = abs(
np.fft.fftshift(np.fft.fftn(da.to_numpy(), axes=axes, **kwargs), axes=axes)
)

# Define new DataArray object

Expand Down

0 comments on commit 83329ef

Please sign in to comment.