Skip to content

Commit

Permalink
Fixed warning in fourigui.py code
Browse files Browse the repository at this point in the history
  • Loading branch information
Filippo Ballerini committed Nov 6, 2024
1 parent c580bd1 commit a0cf108
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
23 changes: 23 additions & 0 deletions news/warning.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

Warning fixed in fourigui.py adding line 397 `axes = list(range(len(size)))` and modifying line 399 `fftholder = np.fft.fftn(fftholder, s=size, axes=axes, norm="ortho")`

**Security:**

* <news item>
3 changes: 2 additions & 1 deletion src/diffpy/fourigui/fourigui.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,9 @@ def fft(self):
def perform_fft(fftholder):
fftholder = np.nan_to_num(fftholder)
size = list(fftholder.shape)
axes = list(range(len(size)))
fftholder = np.fft.ifftshift(fftholder)
fftholder = np.fft.fftn(fftholder, s=size, norm="ortho")
fftholder = np.fft.fftn(fftholder, s=size, axes=axes, norm="ortho")
fftholder = np.fft.fftshift(fftholder)
fftholder = fftholder.real
return fftholder
Expand Down

0 comments on commit a0cf108

Please sign in to comment.