summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormelissawm <melissawm.github@gmail.com>2022-01-05 13:56:18 -0300
committermelissawm <melissawm.github@gmail.com>2022-01-05 13:56:18 -0300
commit5eb658519989cab3850d6e4df17ff09587a159b4 (patch)
treefab2ef1ee816b10ae190fe822ebec34a0bffce93
parenta7ef06d6ceff0f3c618e37025696a79af2e8fed1 (diff)
downloadnumpy-5eb658519989cab3850d6e4df17ff09587a159b4.tar.gz
Remove extra pytorch example
-rw-r--r--doc/source/user/basics.interoperability.rst5
1 files changed, 0 insertions, 5 deletions
diff --git a/doc/source/user/basics.interoperability.rst b/doc/source/user/basics.interoperability.rst
index 46034e6bf..adad4dab9 100644
--- a/doc/source/user/basics.interoperability.rst
+++ b/doc/source/user/basics.interoperability.rst
@@ -322,11 +322,6 @@ Note also that we can see ``__array_wrap__`` in action here, even though
>>> t = torch.arange(4)
>>> np.abs(t)
tensor([0, 1, 2, 3])
- >>> wrap = lambda self, array: np.asarray(array)
- >>> torch.Tensor.__array_wrap__ = wrap
- >>> t = torch.arange(4)
- >>> np.abs(t)
- array([0, 1, 2, 3])
PyTorch implements ``__array_wrap__`` to be able to get tensors back from NumPy
functions, and we can modify it directly to control which type of objects are