multiply#
- metatensor.multiply(A: TensorMap, B: float | int | TensorMap) TensorMap[source]#
- Return a new - TensorMapwith the values being the element-wise multiplication of- Aand- B.- If - Bis a- TensorMapit has to have the same metadata as- A.- If gradients are present in - A:- Bis a scalar then:\[\nabla(A * B) = B * \nabla A\]
- Bis a- TensorMapwith the same metadata of- A.
- The multiplication is performed with the rule of the derivatives: 
 \[\nabla(A * B) = B * \nabla A + A * \nabla B\]
 - Parameters:
- Returns:
- New - TensorMapwith the same metadata as- A.
- Return type: