It is a problem on how numpy multiplication is done unfortunately, because you do b*x, it is numpy implementation that is used. You can try doing x*b and it should fail with a nice error message from pytorch.
Unfortunately there is nothing we can do because due to the way python handle the * operator, if the left element is a numpy object, the numpy functions are going to be used and they are not aware of pytorch tensors