Skip to content

Commit abd21a9

Browse files
committed
TYP: remove expired tostring methods
1 parent 1d271d5 commit abd21a9

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

numpy/lib/_user_array_impl.pyi

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ from types import EllipsisType
22
from typing import Any, Generic, Self, SupportsIndex, TypeAlias, overload
33

44
from _typeshed import Incomplete
5-
from typing_extensions import TypeVar, deprecated, override
5+
from typing_extensions import TypeVar, override
66

77
import numpy as np
88
import numpy.typing as npt
@@ -220,8 +220,6 @@ class container(Generic[_ShapeT_co, _DTypeT_co]):
220220

221221
#
222222
def copy(self, /) -> Self: ...
223-
@deprecated("tostring() is deprecated. Use tobytes() instead.")
224-
def tostring(self, /) -> bytes: ...
225223
def tobytes(self, /) -> bytes: ...
226224
def byteswap(self, /) -> Self: ...
227225
def astype(self, /, typecode: _DTypeLike[_ScalarT]) -> container[_ShapeT_co, np.dtype[_ScalarT]]: ...

numpy/ma/core.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,8 +1057,6 @@ class MaskedArray(ndarray[_ShapeT_co, _DTypeT_co]):
10571057
def toflex(self) -> Incomplete: ...
10581058
def torecords(self) -> Incomplete: ...
10591059
def tolist(self, fill_value: Incomplete | None = None) -> Incomplete: ...
1060-
@deprecated("tostring() is deprecated. Use tobytes() instead.")
1061-
def tostring(self, /, fill_value: Incomplete | None = None, order: _OrderKACF = "C") -> bytes: ... # type: ignore[override]
10621060
def tobytes(self, /, fill_value: Incomplete | None = None, order: _OrderKACF = "C") -> bytes: ... # type: ignore[override]
10631061
def tofile(self, /, fid: Incomplete, sep: str = "", format: str = "%s") -> Incomplete: ...
10641062

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy