In-place operations on tensors is reported by mypy as an error.
Example:
import torch

t = torch.zeros(3)
t.add_(1)

test.py:5: error: "Tensor" has no attribute "add_"; maybe "addr_", "addmv_", or "addmm_"?


PyTorch Version: 1.3.1
OS: Ubuntu 16.04
How you installed PyTorch: conda
Python version: 3.7.4

Is this an error or intended?