Skip to content
Merged
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
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.1.1] - 2025-10-09

### Fixed
* Fix a circular dependency in Intel NumPy: revert vendoring of `scipy.fft` functions, instead using thin wrappers to call from `scipy` directly [gh-233](https://github.com/IntelPython/mkl_fft/pull/233)

## [2.1.0] - 2025-10-06

### Added
Expand All @@ -14,7 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Dropped support for `overwrite_x` parameter in `mkl_fft` [gh-185](https://github.com/IntelPython/mkl_fft/pull/185)
* Replaced `fwd_scale` parameter with `norm` in `mkl_fft` [gh-189](https://github.com/IntelPython/mkl_fft/pull/189)
* Conditionally import `scipy_fft` only if `scipy` is installed [gh-195](https://github.com/IntelPython/mkl_fft/pull/195)
* Added thin wrappers for `fftfreq`, `rfftfreq`, `fftshift`, and `ifftshift` to `scipy_fft` and `numpy_fft` interfaces [gh-226](https://github.com/IntelPython/mkl_fft/pull/226), [gh=229](https://github.com/IntelPython/mkl_fft/pull/229)
* Vendor `fftfreq`, `rfftfreq`, `fftshift`, and `ifftshift` to `scipy_fft` and `numpy_fft` interfaces [gh-226](https://github.com/IntelPython/mkl_fft/pull/226), [gh=229](https://github.com/IntelPython/mkl_fft/pull/229)

### Fixed
* Fixed a bug for N-D FFTs when both `s` and `out` are given [gh-185](https://github.com/IntelPython/mkl_fft/pull/185)
Expand Down
2 changes: 1 addition & 1 deletion conda-recipe-cf/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set version = "2.1.0" %}
{% set version = "2.1.1" %}
{% set buildnumber = 0 %}

package:
Expand Down
2 changes: 1 addition & 1 deletion mkl_fft/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.1.0"
__version__ = "2.1.1"
50 changes: 50 additions & 0 deletions mkl_fft/interfaces/_scipy_fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

import mkl
import numpy as np
import scipy

import mkl_fft

Expand All @@ -61,6 +62,10 @@
"ihfft2",
"hfftn",
"ihfftn",
"fftshift",
"ifftshift",
"fftfreq",
"rfftfreq",
"get_workers",
"set_workers",
]
Expand Down Expand Up @@ -650,6 +655,51 @@ def ihfftn(
return result


# define thin wrappers for scipy functions to avoid circular dependencies
def fftfreq(n, d=1.0, *, xp=None, device=None):
"""
Return the Discrete Fourier Transform sample frequencies.

For full documentation refer to `scipy.fft.fftfreq`.

"""
return scipy.fft.fftfreq(n, d=d, xp=xp, device=device)


def rfftfreq(n, d=1.0, *, xp=None, device=None):
"""
Return the Discrete Fourier Transform sample frequencies (for usage with
`rfft`, `irfft`).

For full documentation refer to `scipy.fft.rfftfreq`.

"""
return scipy.fft.rfftfreq(n, d=d, xp=xp, device=device)


def fftshift(x, axes=None):
"""
Shift the zero-frequency component to the center of the spectrum.

For full documentation refer to `scipy.fft.fftshift`.

"""
from scipy.fft import fftshift

return fftshift(x, axes=axes)


def ifftshift(x, axes=None):
"""
The inverse of `fftshift`. Although identical for even-length `x`, the
functions differ by one sample for odd-length `x`.

For full documentation refer to `scipy.fft.ifftshift`.

"""
return scipy.fft.ifftshift(x, axes=axes)


def get_workers():
"""
Gets the number of workers used by mkl_fft by default.
Expand Down
93 changes: 0 additions & 93 deletions mkl_fft/interfaces/_scipy_helper.py

This file was deleted.

5 changes: 4 additions & 1 deletion mkl_fft/interfaces/scipy_fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@
from ._scipy_fft import (
fft,
fft2,
fftfreq,
fftn,
fftshift,
get_workers,
hfft,
hfft2,
hfftn,
ifft,
ifft2,
ifftn,
ifftshift,
ihfft,
ihfft2,
ihfftn,
Expand All @@ -44,10 +47,10 @@
irfftn,
rfft,
rfft2,
rfftfreq,
rfftn,
set_workers,
)
from ._scipy_helper import fftfreq, fftshift, ifftshift, rfftfreq

__all__ = [
"fft",
Expand Down
Loading