Open
Description
opened on Dec 9, 2017
This came up in a Slack discussion about adding lag
and lead
functions, which are similar to circshift
. In many cases, allocating a vector to store the result of circshift
is a waste, as a lazy view would be sufficient and as efficient. Looking at uses of circshift
on GitHub shows several examples where the result is discarded immediately.
It would make sense to have Iterators.circshift
, returning a custom AbstractArray
object which would redirect getindex
calls to the parent after shifting the index. circshift!(dest, src, shift)
would be replaced with copy!(dest, Iterators.circshift(src, shift))
.
Activity