Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expose new container construction utilities #452

Closed
mcol opened this issue Jan 31, 2020 · 2 comments · Fixed by #550
Closed

expose new container construction utilities #452

mcol opened this issue Jan 31, 2020 · 2 comments · Fixed by #550
Assignees

Comments

@mcol
Copy link
Contributor

mcol commented Jan 31, 2020

In stan-dev/math#1620 and stan-dev/math#1636 we added new utilities to create containers. The following signatures should be added to the language:

matrix identity_matrix(int)

int[] one_hot_int_array(int, int)
real[] one_hot_array(int, int)
row_vector one_hot_row_vector(int, int)
vector one_hot_vector(int, int)

int[] ones_int_array(int)
real[] ones_array(int)
row_vector ones_row_vector(int)
vector ones_vector(int)

real[] linspaced_array(int, real, real)
row_vector linspaced_row_vector(int, real, real)
vector linspaced_vector(int, real, real)

vector uniform_simplex(int)

int[] zeros_int_array(int)
real[] zeros_array(int)
row_vector zeros_row_vector(int)
vector zeros_vector(int)
@rok-cesnovar rok-cesnovar self-assigned this Jan 31, 2020
@mcol
Copy link
Contributor Author

mcol commented Feb 2, 2020

This should wait for stan-dev/math#1666, as it adds a few more functions and renames some. I'll update the issue description when that's settled.

@mcol
Copy link
Contributor Author

mcol commented Feb 5, 2020

I've updated the description with the most recent changes, this is now ready to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants