#NEWLINE# def test_Hadamard( ) : #NEWLINE# #INDENT# from sympy.matrices import MatrixSymbol , HadamardProduct #NEWLINE# X = MatrixSymbol ( 'X' , 2 , 2 ) #NEWLINE# Y = MatrixSymbol ( 'Y' , 2 , 2 ) #NEWLINE# assert ( latex ( HadamardProduct ( X , ( Y * Y ) ) ) == 'X \\circ \\left(Y Y\\right)' ) #NEWLINE# assert ( latex ( ( HadamardProduct ( X , Y ) * Y ) ) == '\\left(X \\circ Y\\right) Y' )