add new() method identifier to _StorageBase (#98201)
The method torch.UntypedStorage.new is not detailed in API docs. Adding a method identifier may make it easier to know that new() method is only implemented by cpp, like copy_() or nbytes().
Pull Request resolved: https://github.com/pytorch/pytorch/pull/98201
Approved by: https://github.com/ezyang
diff --git a/torch/storage.py b/torch/storage.py
index a7aca10..5e24245 100644
--- a/torch/storage.py
+++ b/torch/storage.py
@@ -30,6 +30,7 @@
def __len__(self) -> int: ... # noqa: E704
def __getitem__(self, idx): ... # noqa: E704
def copy_(self, source: T, non_blocking: bool = None) -> T: ... # noqa: E704
+ def new(self) -> T: ... # noqa: E704
def nbytes(self) -> int: ... # noqa: E704
def size(self) -> int: