diff options
author | melissawm <melissawm.github@gmail.com> | 2022-01-05 13:56:18 -0300 |
---|---|---|
committer | melissawm <melissawm.github@gmail.com> | 2022-01-05 13:56:18 -0300 |
commit | 5eb658519989cab3850d6e4df17ff09587a159b4 (patch) | |
tree | fab2ef1ee816b10ae190fe822ebec34a0bffce93 | |
parent | a7ef06d6ceff0f3c618e37025696a79af2e8fed1 (diff) | |
download | numpy-5eb658519989cab3850d6e4df17ff09587a159b4.tar.gz |
Remove extra pytorch example
-rw-r--r-- | doc/source/user/basics.interoperability.rst | 5 |
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 |