Multiply elements of tensor by the scalar value and add it to self. The number of elements must match, but sizes do not matter.

> x = torch.Tensor(2,2):fill(2)
> y = torch.Tensor(4):fill(3)
> x:add(2, y)
> = x

 8  8
 8  8
[torch.Tensor of dimension 2x2]