-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
regular array and vector constructor functions #838
Comments
function for creating regular arrays is still not available? |
Correct. It's easy to write one yourself and Stan gets compiled to efficient code, so we haven't prioritized this. If someone builds it, we'll accept a PR for this. |
In #1636 we have added |
I like the idea of matching MATLAB, numpy, and Eigen and am happy to review the changes. I'm also OK just leaving it spaced_vector with "linear" as a default. Is it really linspace_vector and not linspaced_vector? I like the adjectival form better!
I'm OK doing whatever, but if the current ones escaped to a language release, they're going to need to be deprecated.
|
These are not exposed yet, so we are free to pick what we want. I also think |
The |
Summary:
Create functions to create regular arrays.
Here's one from MATLAB (also related to Python
range
):There could also be
linspace_array
andlinspace_row_vector
versions. It might be possible to call the vector or array version justlinspace
.Python provides
range
, which is a bit different.In R, there's a function
seq
that allows either of these parameterizations, but we don't want to follow that redundant pattern.This one's a suggestion from peterzh on http://discourse.mc-stan.org/t/create-vector-from-a-number-range/3760.
This will then get pushed through to Stan.
Current Version:
v2.17.0
The text was updated successfully, but these errors were encountered: