Skip to content

Commit 23673e2

Browse files
committed
🩹 fft: reject scalars
1 parent 2dccd6a commit 23673e2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

‎scipy-stubs/fft/_basic.pyi

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ _ShapeT = TypeVar("_ShapeT", bound=tuple[int, ...])
1313
_Norm: TypeAlias = Literal["backward", "ortho", "forward"]
1414
_Unused: TypeAlias = Never # not used by scipy
1515

16-
_AsFloat32: TypeAlias = onp.CanArray[_ShapeT, np.dtype[npc.floating32]]
17-
_AsFloat64: TypeAlias = onp.CanArray[_ShapeT, np.dtype[np.bool_ | npc.integer | npc.floating64]]
18-
_AsFloat80: TypeAlias = onp.CanArray[_ShapeT, np.dtype[np.longdouble]]
16+
_AsFloat32: TypeAlias = onp.CanArrayND[npc.floating32, _ShapeT]
17+
_AsFloat64: TypeAlias = onp.CanArrayND[np.bool_ | npc.integer | npc.floating64, _ShapeT]
18+
_AsFloat80: TypeAlias = onp.CanArrayND[np.longdouble, _ShapeT]
1919

20-
_AsComplex64: TypeAlias = onp.CanArray[_ShapeT, np.dtype[npc.inexact32]]
21-
_AsComplex128: TypeAlias = onp.CanArray[_ShapeT, np.dtype[np.bool_ | npc.integer | npc.inexact64]]
22-
_AsComplex160: TypeAlias = onp.CanArray[_ShapeT, np.dtype[np.longdouble | np.clongdouble]]
20+
_AsComplex64: TypeAlias = onp.CanArrayND[np.float32 | np.complex64, _ShapeT]
21+
_AsComplex128: TypeAlias = onp.CanArrayND[np.bool_ | npc.integer | np.float64 | np.complex128, _ShapeT]
22+
_AsComplex160: TypeAlias = onp.CanArrayND[np.longdouble | np.clongdouble, _ShapeT]
2323

24-
_ToFloat64_ND: TypeAlias = onp.ToArrayND[float, np.bool_ | npc.integer | npc.floating64]
24+
_ToFloat64_ND: TypeAlias = onp.ToArrayND[float, np.bool_ | npc.integer | np.float64]
2525
_ToComplex128_ND: TypeAlias = onp.ToArrayND[complex, np.bool_ | npc.integer | npc.inexact64]
2626

2727
###

0 commit comments

Comments
 (0)