Hadamard (element wise) product
Dear all, Some Hadamard products are involved in my equations, and I did not find a way to implement it. The idea is to apply a element by element product between two matrices A and B, where : - A and B have the same size, let say tensor of dim (N,) - M = A*B is also a tensor of dim (N,) where each elements M[i] = A[i]*B[i] (not summed!) ; (same with rank 2 tensors) So I would like to use the same kind of product as the dot product, but without summing the elements. Is that possible ? Thanks, Floriane
Do you mean elementwise multiplication? M = elem_mult(A, B) ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Floriane Gidel [RPG] <mmfg@leeds.ac.uk> Sent: 08 June 2016 12:40:59 To: firedrake Subject: [firedrake] Hadamard (element wise) product Dear all, Some Hadamard products are involved in my equations, and I did not find a way to implement it. The idea is to apply a element by element product between two matrices A and B, where : - A and B have the same size, let say tensor of dim (N,) - M = A*B is also a tensor of dim (N,) where each elements M[i] = A[i]*B[i] (not summed!) ; (same with rank 2 tensors) So I would like to use the same kind of product as the dot product, but without summing the elements. Is that possible ? Thanks, Floriane
Yes that's it ! Thanks Miklós! ________________________________ De : firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> de la part de Homolya, Miklós <m.homolya14@imperial.ac.uk> Envoyé : mercredi 8 juin 2016 14:09:47 À : firedrake Objet : Re: [firedrake] Hadamard (element wise) product Do you mean elementwise multiplication? M = elem_mult(A, B) ________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Floriane Gidel [RPG] <mmfg@leeds.ac.uk> Sent: 08 June 2016 12:40:59 To: firedrake Subject: [firedrake] Hadamard (element wise) product Dear all, Some Hadamard products are involved in my equations, and I did not find a way to implement it. The idea is to apply a element by element product between two matrices A and B, where : - A and B have the same size, let say tensor of dim (N,) - M = A*B is also a tensor of dim (N,) where each elements M[i] = A[i]*B[i] (not summed!) ; (same with rank 2 tensors) So I would like to use the same kind of product as the dot product, but without summing the elements. Is that possible ? Thanks, Floriane
participants (2)
- 
                
                Floriane Gidel [RPG]
- 
                
                Homolya, Miklós