Thank you!
This works indeed, but I think it can result in some precision loss in some cases. For example, in my particular case the first column has integer values (of type long) and the second column has floating-point type values (float32). When I construct augmented_a, I get a floating-point type 1D array, and only integers in [-16777216, 16777216] can be represented in float32 without precision loss (according to Wikipedia). a.select(1, 0) * M can contain large numbers like these if M is large.
Maybe there is a more suitable way?