The documentation of torch.squeeze 22 (PyTorch 0.4) states that “As an exception to the above, a 1-dimensional tensor of size 1 will not have its dimensions changed.”
However, when I torch.squeeze() a 1-dimensional tensor, it becomes zero-dimensional: i.e. it does get squeezed!
>>> import torch
>>> torch.__version__
'0.4.0'
>>> a = torch.tensor([512])
>>> a.shape
torch.Size([1])
>>> a = a.squeeze()
>>> a.shape
torch.Size([])

Is this an implementation bug, a documentation bug, or am I the bug?