Matrix -> array conversion functions

When working with multivariate data I like representing it as a matrix rather than array[] vector. This enables linear transformations to be expressed as large matrix multiplications. But when calculating the likelihood, arrays are necessary. I often wish we had to_vectors and to_row_vectors that take a matrix and give back an array. Is there a reason these functions do not exist other than they’re not a priority? Or maybe there is a trick I’m missing in my workflow?

2 Likes

These indeed do not exist, and it is mostly because of priorities, as you say (though there are definitely memory reordering/efficiency concerns)

There is a tracking issue here for these specifically

2 Likes