Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* `irfft` with `out=` now writes directly into `out` when the cast or zero-padded copy of a non-contiguous input has the same memory order as `out`, avoiding a temporary array and an extra copy [gh-396](https://github.com/IntelPython/mkl_fft/pull/396)

### Fixed
* Fixed `mkl_fft.interfaces.scipy_fft.rfft2` ignoring a positional `norm` argument by matching SciPy's parameter order
* Zero-padding (`n` larger than the input length along the axis) of input that is both C- and F-contiguous, such as shape `(m, 1)` padded along axis 1, now gives a C-contiguous result as NumPy does instead of a Fortran-contiguous one, so a C-ordered `out` is also written directly without a temporary copy [gh-397](https://github.com/IntelPython/mkl_fft/pull/397)

## [2.4.0] - 2026-10-16
Expand Down
2 changes: 1 addition & 1 deletion mkl_fft/interfaces/_scipy_fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,8 @@ def rfft2(
x,
s=None,
axes=(-2, -1),
overwrite_x=False,
norm=None,
overwrite_x=False,
workers=None,
*,
plan=None,
Expand Down
10 changes: 10 additions & 0 deletions mkl_fft/tests/test_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ def test_scipy_rfft(norm, dtype):
assert np.allclose(x, xx, atol=tol, rtol=tol)


@pytest.mark.parametrize("norm", [None, "forward", "backward", "ortho"])
@pytest.mark.parametrize("dtype", [np.float32, np.float64])
def test_scipy_rfft2_positional_norm(norm, dtype):
sp_fft = pytest.importorskip("scipy.fft", reason="requires scipy")
x = np.ones((2, 2), dtype=dtype)
result = mfi.scipy_fft.rfft2(x, None, (-2, -1), norm)
expected = sp_fft.rfft2(x, norm=norm)
np.testing.assert_allclose(result, expected)


@pytest.mark.parametrize("norm", [None, "forward", "backward", "ortho"])
@pytest.mark.parametrize("dtype", [np.float32, np.float64])
def test_numpy_rfft(norm, dtype):
Expand Down