Remove deprecated masked_copy (#9819)
Summary:
No tests are affected by this removal.
Closes https://github.com/pytorch/pytorch/issues/1885 and closes #9817
While I was at it, I also fixed #9876 .
Pull Request resolved: https://github.com/pytorch/pytorch/pull/9819
Differential Revision: D9018126
Pulled By: SsnL
fbshipit-source-id: a9142bf4e2403bef05779a097f61fa8b7db04b71
diff --git a/docs/source/tensors.rst b/docs/source/tensors.rst
index 05909a6..c3c8579 100644
--- a/docs/source/tensors.rst
+++ b/docs/source/tensors.rst
@@ -224,6 +224,7 @@
.. automethod:: expand_as
.. automethod:: exponential_
.. automethod:: fill_
+ .. automethod:: flatten
.. automethod:: flip
.. automethod:: float
.. automethod:: floor
diff --git a/docs/source/torch.rst b/docs/source/torch.rst
index 3ee7d6e..c1e914c 100644
--- a/docs/source/torch.rst
+++ b/docs/source/torch.rst
@@ -259,6 +259,7 @@
.. autofunction:: diagflat
.. autofunction:: diagonal
.. autofunction:: einsum
+.. autofunction:: flatten
.. autofunction:: flip
.. autofunction:: histc
.. autofunction:: meshgrid
diff --git a/torch/tensor.py b/torch/tensor.py
index 60a50b6..b9a35e3 100644
--- a/torch/tensor.py
+++ b/torch/tensor.py
@@ -292,14 +292,6 @@
def scatter_add(self, dim, index, source):
return self.clone().scatter_add_(dim, index, source)
- def masked_copy(self, mask, tensor):
- warnings.warn("masked_copy is deprecated and renamed to masked_scatter, and will be removed in v0.3")
- return self.masked_scatter(mask, tensor)
-
- def masked_copy_(self, mask, tensor):
- warnings.warn("masked_copy_ is deprecated and renamed to masked_scatter_, and will be removed in v0.3")
- return self.masked_scatter_(mask, tensor)
-
def masked_scatter(self, mask, tensor):
return self.clone().masked_scatter_(mask, tensor)