Skip to content

Commit ca522d1

Browse files
authored
TYP,BUG: Remove numpy.cast and numpy.disp from the typing stubs. (numpy#26937)
* TYP,BUG: Remove `numpy.cast` and `numpy.disp` in the stubs. Accessing these at runtime will raise an `AttributeError` since their removal in NumPy 2.0. But this wasn't reflected in the typing stubs. * TYP: Remove the deprecated ``numpy._function_base_impl.disp`` function from the typing stubs
1 parent 7ace427 commit ca522d1

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

numpy/__init__.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,6 @@ from numpy._core.numeric import (
389389
from numpy._core.numerictypes import (
390390
isdtype as isdtype,
391391
issubdtype as issubdtype,
392-
cast as cast,
393392
ScalarType as ScalarType,
394393
typecodes as typecodes,
395394
)
@@ -439,7 +438,6 @@ from numpy.lib._function_base_impl import (
439438
angle as angle,
440439
unwrap as unwrap,
441440
sort_complex as sort_complex,
442-
disp as disp,
443441
flip as flip,
444442
rot90 as rot90,
445443
extract as extract,

numpy/lib/_function_base_impl.pyi

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ from typing import (
1212

1313
from numpy import (
1414
vectorize as vectorize,
15-
ufunc,
1615
generic,
1716
floating,
1817
complexfloating,
@@ -313,12 +312,6 @@ def extract(condition: ArrayLike, arr: ArrayLike) -> NDArray[Any]: ...
313312

314313
def place(arr: NDArray[Any], mask: ArrayLike, vals: Any) -> None: ...
315314

316-
def disp(
317-
mesg: object,
318-
device: None | _SupportsWriteFlush = ...,
319-
linefeed: bool = ...,
320-
) -> None: ...
321-
322315
@overload
323316
def cov(
324317
m: _ArrayLikeFloat_co,

0 commit comments

Comments
 (0)