Skip to content

Commit 43c063a

Browse files
vishwakftwRob Kunkle
authored and
Rob Kunkle
committed
Remove deprecated masked_copy (pytorch#9819)
Summary: No tests are affected by this removal. Closes pytorch#1885 and closes pytorch#9817 While I was at it, I also fixed pytorch#9876 . Pull Request resolved: pytorch#9819 Differential Revision: D9018126 Pulled By: SsnL fbshipit-source-id: a9142bf4e2403bef05779a097f61fa8b7db04b71
1 parent 58d7197 commit 43c063a

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

docs/source/tensors.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ view of a storage and defines numeric operations on it.
224224
.. automethod:: expand_as
225225
.. automethod:: exponential_
226226
.. automethod:: fill_
227+
.. automethod:: flatten
227228
.. automethod:: flip
228229
.. automethod:: float
229230
.. automethod:: floor

docs/source/torch.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ Other Operations
259259
.. autofunction:: diagflat
260260
.. autofunction:: diagonal
261261
.. autofunction:: einsum
262+
.. autofunction:: flatten
262263
.. autofunction:: flip
263264
.. autofunction:: histc
264265
.. autofunction:: meshgrid

torch/tensor.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -292,14 +292,6 @@ def scatter(self, dim, index, source):
292292
def scatter_add(self, dim, index, source):
293293
return self.clone().scatter_add_(dim, index, source)
294294

295-
def masked_copy(self, mask, tensor):
296-
warnings.warn("masked_copy is deprecated and renamed to masked_scatter, and will be removed in v0.3")
297-
return self.masked_scatter(mask, tensor)
298-
299-
def masked_copy_(self, mask, tensor):
300-
warnings.warn("masked_copy_ is deprecated and renamed to masked_scatter_, and will be removed in v0.3")
301-
return self.masked_scatter_(mask, tensor)
302-
303295
def masked_scatter(self, mask, tensor):
304296
return self.clone().masked_scatter_(mask, tensor)
305297

0 commit comments

Comments
 (0)