Skip to content

Commit bc56166

Browse files
committed
fix: accept list and ndarray in s and axes
* NumPy fftnd support for list and ndarray for `axes` * NumPy fftnd support for list and ndarray for `s` when `norm="ortho"`
1 parent 75e9ffd commit bc56166

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

mkl_fft/_numpy_fft.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ def frwd_sc_1d(n, s):
7676

7777

7878
def frwd_sc_nd(s, axes, x_shape):
79-
ss = s if s else x_shape
80-
if axes:
79+
ss = s if s is not None else x_shape
80+
if axes is not None:
8181
nn = prod([ss[ai] for ai in axes])
8282
else:
8383
nn = prod(ss)

mkl_fft/_pydfti.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ def iter_complementary(x, axes, func, kwargs, result):
932932
nd = x.ndim
933933
r = list(range(nd))
934934
sl = [slice(None, None, None)] * nd
935-
if not isinstance(axes, tuple):
935+
if not np.iterable(axes):
936936
axes = (axes,)
937937
for ai in axes:
938938
r[ai] = None

0 commit comments

Comments
 (0)