\*Question edited/updated to add an example

Hi all! I have this `a` np.array. Based on the reference values of it, I want to update array `b`, which is my matrix. The "1st column" of `a` represents a code and the "2nd column" is my reference value. The matrix is populated with codes and I must replace them. See below the example.

```
import numpy as np
a = np.asarray([[0, 11], [1, 22], [2, 33]])
b = np.asarray([[0, 14, 12, 2], [1, 1, 7, 0], [0, 0,3,5], [1, 2, 2, 6]])

```

In other words: I want to replace the 0, 1, 2 values in "b" by 11, 22, 33, respectively.

Which is the best way to do that, considering that my real `a` array has +- 50 codes and my real `b` matrices have a shape of (850,850).

Thanks in advance!