r""" storage() -> torch.TypedStorage Returns the underlying :class:`TypedStorage`. .. warning:: :class:`TypedStorage` is deprecated. It will be removed in the future, and :class:`UntypedStorage` will be the only storage class. To access the
(self)
| 220 | return (_rebuild_from_type_v2, (func, type(self), args, state)) |
| 221 | |
| 222 | def storage(self): |
| 223 | r""" |
| 224 | storage() -> torch.TypedStorage |
| 225 | |
| 226 | Returns the underlying :class:`TypedStorage`. |
| 227 | |
| 228 | .. warning:: |
| 229 | |
| 230 | :class:`TypedStorage` is deprecated. It will be removed in the future, and |
| 231 | :class:`UntypedStorage` will be the only storage class. To access the |
| 232 | :class:`UntypedStorage` directly, use :attr:`Tensor.untyped_storage()`. |
| 233 | """ |
| 234 | if has_torch_function_unary(self): |
| 235 | return handle_torch_function(Tensor.storage, (self,), self) |
| 236 | |
| 237 | torch.storage._warn_typed_storage_removal(stacklevel=2) |
| 238 | return self._typed_storage() |
| 239 | |
| 240 | # For internal use only, to avoid raising deprecation warning |
| 241 | def _typed_storage(self): |