class_docstr: Elementwise product of matrix expressions
  
  Examples
  ========
  
  Hadamard product for matrix symbols:
  
  >>> from sympy import hadamard_product, HadamardProduct, MatrixSymbol
  >>> A = MatrixSymbol('A', 5, 5)
  >>> B = MatrixSymbol('B', 5, 5)
  >>> isinstance(hadamard_product(A, B), HadamardProduct)
  True
  
  Notes
  =====
  
  This is a symbolic object that simply stores its argument without
  evaluating it. To actually compute the product, use the function
  ``hadamard_product()`` or ``HadamardProduct.doit``
class_docstr_tok: ["Elementwise","product","of","matrix","expressions","Examples","========","Hadamard","product","for","matrix","symbols",":",">",">",">","from","sympy","import","hadamard_product",",","HadamardProduct",",","MatrixSymbol",">",">",">","A","=","MatrixSymbol","(","'","A","'",",","5",",","5",")",">",">",">","B","=","MatrixSymbol","(","'","B","'",",","5",",","5",")",">",">",">","isinstance","(","hadamard_product","(","A",",","B",")",",","HadamardProduct",")","True","Notes","=====","This","is","a","symbolic","object","that","simply","stores","its","argument","without","evaluating","it",".","To","actually","compute","the","product",",","use","the","function","``","hadamard_product","(",")","``","or","``","HadamardProduct.doit","``"]
code: def doit(self, **hints):
      expr = self.func(*(i.doit(**hints) for i in self.args))
      # Check for explicit matrices:
      from sympy.matrices.matrixbase import MatrixBase
      from sympy.matrices.immutable import ImmutableMatrix
  
      explicit = [i for i in expr.args if isinstance(i, MatrixBase)]
      if explicit:
          remainder = [i for i in expr.args if i not in explicit]
          expl_mat = ImmutableMatrix(
              [Mul.fromiter(i) for i in zip(*explicit)]
          ).reshape(*self.shape)
          expr = HadamardProduct(*([expl_mat] + remainder))
  
      return canonicalize(expr)
  
imports: from collections import Counter
  from sympy.core import Mul, sympify
  from sympy.core.add import Add
  from sympy.core.expr import ExprBuilder
  from sympy.core.sorting import default_sort_key
  from sympy.functions.elementary.exponential import log
  from sympy.matrices.expressions.matexpr import MatrixExpr
  from sympy.matrices.expressions._shape import validate_matadd_integer
  from sympy.matrices.expressions.special import ZeroMatrix, OneMatrix
  from sympy.strategies import unpack, flatten, condition, exhaust, rm_id, sort
  from sympy.utilities.exceptions import sympy_deprecation_warning
label_desc: Use image node_id 5 for calling the HadamardProduct obj's underlying member method code with example usage: obj.doit() and returns: canonicalize