Skip to content

matrix to array-of-vectors and vice-versa #669

Open
@bob-carpenter

Description

@bob-carpenter

Summary:

Implement functions that will look like this in Stan:

// to_matrix(rv)[i, j] = rv[i, j]
matrix to_matrix(row_vector[] rv);  

// to_matrix(v)[i, j] = v[j, i]
matrix to_matrix(vector[] x);

// array_of_rows(y)[i, j] = y[i, j]
row_vector[] array_of_rows(matrix y);

// array_of_columns(y)[i, j] = y[j, i]
vector[] array_of_columns(matrix y);

Additional Info

Also need to add mc-stan/stan.

Current Version:

v2.17.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions