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

Reverse array_find #269

Closed
Bart92 opened this issue Jul 5, 2021 · 1 comment · Fixed by #291
Closed

Reverse array_find #269

Bart92 opened this issue Jul 5, 2021 · 1 comment · Fixed by #291
Assignees
Labels
Milestone

Comments

@Bart92
Copy link

Bart92 commented Jul 5, 2021

I'm currently working on a use case in which I'm trying to calculate the start and end of growing season in a rather simplified way by basically just putting a threshold on the amplitude of a vegetation index. The array_find function has proven useful for finding the start, but finding the end would require the reverse of the array [::-1]

@m-mohr
Copy link
Member

m-mohr commented Jul 5, 2021

Thanks, this is interesting. Could you make use of array_filter to extract the data you need?

In theory, there's also the rearrange process to change the order of the array, but that feels overly complicated for this use case.
So if you can't make use of array_filter, I'd say the next step would be to include either array_reverse or add a parameter reverse to array_find.

@m-mohr m-mohr added the minor label Oct 7, 2021
@m-mohr m-mohr self-assigned this Oct 7, 2021
@m-mohr m-mohr added this to the 1.2.0 milestone Oct 7, 2021
m-mohr added a commit that referenced this issue Oct 25, 2021
@m-mohr m-mohr linked a pull request Oct 25, 2021 that will close this issue
m-mohr added a commit that referenced this issue Nov 4, 2021
@m-mohr m-mohr closed this as completed Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants