-
Notifications
You must be signed in to change notification settings - Fork 45
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
trouble with real=True in dft #83
Comments
|
Did it work @navidcy ? If so, I'm gonna close this :) |
@roxyboy, I got a different error now xrft.dft(da, dim=['time'], real='time', window=True)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-17-3ee90d6aade1> in <module>
----> 1 xrft.dft(da, dim=['time'], real='time', window=True)
/g/data3/hh5/public/apps/miniconda3/envs/analysis3-19.07/lib/python3.6/site-packages/xrft/xrft.py in dft(da, spacing_tol, dim, real, shift, detrend, window, chunks_to_segments)
350 if trans:
351 enddims = [prefix + d for d in rawdims if d in dim]
--> 352 return daft.transpose(*enddims)
353 else:
354 return daft
/g/data3/hh5/public/apps/miniconda3/envs/analysis3-19.07/lib/python3.6/site-packages/xarray/core/dataarray.py in transpose(self, transpose_coords, *dims)
1850 raise ValueError(
1851 "arguments to transpose (%s) must be "
-> 1852 "permuted array dimensions (%s)" % (dims, tuple(self.dims))
1853 )
1854
ValueError: arguments to transpose (('freq_time',)) must be permuted array dimensions (('yt_ocean', 'xt_ocean', 'freq_time')) But you are right. This doesn't seem to be an issue of the package so I'm closing it and we can continue discussion over email. |
This is probably the same issue as #78 . It seems that xarray did some updates which we may have to update |
OK, I'm reopening this then. How come the tests didn't break when xarray updated? Perhaps you need to make stricter tests? (I'd happily do it but I'm not very good with python...) |
That's probably because our test environment is Python 3.6.7 while as the new xarray features are in Python 3.7 |
Xarray is the same in Python 3.6 and 3.7 |
Hmm, then I'm not sure why real DFT generated errors in Python 3.7 and not in 3.6. In any case, the tests for real DFT in Python 3.7 all pass in PR #88. |
I am having some trouble using the real fft. I have a time series of temperature data:
When I use
dft
without thereal=True
flag all seems good:But when I give
real=True
I get:Am I doing something wrong?
The text was updated successfully, but these errors were encountered: