Hadamard product

Element-wise product.

The distinction between Hadamard product and matrix product in python:

For numpy.ndarray objects, * performs elementwise multiplication, and matrix multiplication must use a function call (numpy.dot). For numpy.matrix objects, * performs matrix multiplication, and elementwise multiplication requires function syntax.

That is to say, when the variable type is numpy.ndarray, represents the Hadamard product; when the variable type is numpy.matrix,∗ represents the matrix product.

 

https://blog.csdn.net/Flying_sfeng/article/details/79330336

 

 

 

 

 

 


 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325005449&siteId=291194637