Some funny behavior in numpy.float64.__mul__ when being multiplied with pytorch Variables. Reproduction code:
import torch
import numpy as np
scalar = np.array([1.1])[0] # is of type numpy.float64 rather than the primitive float
var = torch.autograd.Variable(torch.randn(2))
res1 = var * scalar
res2 = scalar * var
print(res2)