-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
cumsum
and friends don't support tuples
#26690
Comments
You can use See also #25766. |
Tuples are not AbstractArrays so perhaps better to use StaticArrays.jl for this? |
On #25766 I've thought before that |
Are all the items in the tuple the same type? If they aren't and the tuple is short you might be better of going with recursion? I could make an |
@stevengj thanks for that suggestion,
For me this came up in the context of wanting to do something like |
I implemented |
cumsum(x)
,cumprod(x)
anddiff(x)
(maybe others?) don't have methods defined for tuples.vec
also doesn't have a tuple method so it can't be used to convert (though ifcumsum(::Tuple)
were implemented I'd expect it to also return a tuple)The text was updated successfully, but these errors were encountered: