I would like to implement the following operation: B = diag(u) @ K @ diag(v) - multiplication of some matrix K, from the left and right by a diagonal matrices.
B = diag(u) @ K @ diag(v)