-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests helper utilities for fft setup
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import exponax as ex | ||
|
||
|
||
def test_space_indices(): | ||
assert ex.spectral.space_indices(1) == (-1,) | ||
assert ex.spectral.space_indices(2) == (-2, -1) | ||
assert ex.spectral.space_indices(3) == (-3, -2, -1) | ||
|
||
|
||
def test_spatial_shape(): | ||
assert ex.spectral.spatial_shape(1, 64) == (64,) | ||
assert ex.spectral.spatial_shape(2, 64) == (64, 64) | ||
assert ex.spectral.spatial_shape(3, 64) == (64, 64, 64) | ||
|
||
|
||
def test_wavenumber_shape(): | ||
assert ex.spectral.wavenumber_shape(1, 64) == (33,) | ||
assert ex.spectral.wavenumber_shape(2, 64) == (64, 33) | ||
assert ex.spectral.wavenumber_shape(3, 64) == (64, 64, 33) | ||
|
||
assert ex.spectral.wavenumber_shape(1, 65) == (33,) | ||
assert ex.spectral.wavenumber_shape(2, 65) == (65, 33) | ||
assert ex.spectral.wavenumber_shape(3, 65) == (65, 65, 33) |