Why does NumPy (and PyTorch) allow direct multiplicaiton of two row vectors?

Thanks for the reply.

Yes, it’s doing element-wise multiplication, and that’s why a sum function is needed to obtain the same output as that from a dot product.