mirror of
https://github.com/ml-explore/mlx.git
synced 2025-09-01 12:49:44 +08:00
add fftshift and ifftshift fft helpers (#2135)
* add fftshift and ifftshift fft helpers * address comments * axes have to be iterable * fix fp error in roll + add test --------- Co-authored-by: Aashiq Dheeraj <aashiq@aashiq-mbp-m4.local>
This commit is contained in:
@@ -3859,6 +3859,9 @@ TEST_CASE("test roll") {
|
||||
y = roll(x, {1, 2}, {0, 1});
|
||||
CHECK(array_equal(y, array({8, 9, 5, 6, 7, 3, 4, 0, 1, 2}, {2, 5}))
|
||||
.item<bool>());
|
||||
|
||||
y = roll(array({}), 0, 0);
|
||||
CHECK(array_equal(y, array({})).item<bool>());
|
||||
}
|
||||
|
||||
TEST_CASE("test contiguous") {
|
||||
|
Reference in New Issue
Block a user