Simple Mat literal

Is there a better way to create a type Mat for v that stores 3 float or double values?

Mat M = (Mat_<double>(3,3) << 1, 0, 0, 0, 1, 0, 0, 0, 1);
// or whatever type and shape you like, or use python ;)

https://docs.opencv.org/4.x/d3/d63/classcv_1_1Mat.html