Skip to content

Commit

Permalink
Non-allocating _circulate (#102)
Browse files Browse the repository at this point in the history
* Non-allocating _firstnonzero and _circulate

* don't extend _firstnonzero
  • Loading branch information
jishnub committed Jul 12, 2023
1 parent 274044a commit e028273
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ AbstractFFTs = "0.4, 0.5, 1"
Aqua = "0.6"
DSP = "0.7.7"
FFTW = "1"
FillArrays = "0.12,0.13,1"
FillArrays = "0.12, 0.13, 1"
StatsBase = "0.32, 0.33, 0.34"
julia = "1.0"

Expand Down
2 changes: 1 addition & 1 deletion src/special.jl
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function getproperty(A::UpperTriangularToeplitz, s::Symbol)
end
end

_circulate(v::AbstractVector) = reverse(v, 2)
_circulate(v::AbstractVector) = view(Circulant(v), 1, :)
function _firstnonzero(v::AbstractVector)
w = zero(v)
w[1] = v[1]
Expand Down

0 comments on commit e028273

Please sign in to comment.