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

add reverse() function for arrays and vectors #344

Closed
bob-carpenter opened this issue Aug 13, 2016 · 4 comments · Fixed by #1650
Closed

add reverse() function for arrays and vectors #344

bob-carpenter opened this issue Aug 13, 2016 · 4 comments · Fixed by #1650

Comments

@bob-carpenter
Copy link
Contributor

Summary:

reverse(x) should return the elements of x in reversed order.

Description:

This allows, for example, a decreasing vector type by reversing an increasing one.

Current Version:

v2.11.0

@bob-carpenter
Copy link
Contributor Author

Marco --- I assigned you to this because you wrote most of the other shape and order wrangling functions. If you don't want to do it, please just unassign yourself. No rush, I gave it a target milestone of Future.

@ghost ghost mentioned this issue Jan 25, 2017
3 tasks
@ghost ghost assigned ghost and unassigned randommm Jan 25, 2017
@linwangidd
Copy link

Hello. May I know if the "reverse(x)" function still not available in current version of Rstan?

@bob-carpenter
Copy link
Contributor Author

Correct. Nobody's implemented it. It should be an easy first issue as it doesn't interact with anything else and it's a simple algorithm.

@bob-carpenter
Copy link
Contributor Author

P.S. Almost any program using reverse outside of transformed data (where it'll only occur once) should probably be reshaped so that's not necessary.

@mcol mcol mentioned this issue Jan 28, 2020
5 tasks
@mcol mcol modified the milestones: Future, 3.1.0++ Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants