Skip to content

Commit

Permalink
Import require_one_based_indexing directly from Base
Browse files Browse the repository at this point in the history
  • Loading branch information
jishnub committed Jan 8, 2024
1 parent dbb811c commit dd6d811
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/ToeplitzMatrices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Base: adjoint, convert, transpose, size, getindex, similar, copy, getprop
import Base: parent
import Base: ==, +, -, *, \
import Base: AbstractMatrix
import Base: require_one_based_indexing
import LinearAlgebra: Cholesky, Factorization
import LinearAlgebra: ldiv!, factorize, lmul!, pinv, eigvals, eigvecs, eigen, Eigen, det
import LinearAlgebra: cholesky!, cholesky, tril!, triu!, checksquare, rmul!, dot, mul!, tril, triu, diag
Expand All @@ -23,14 +24,6 @@ const HermOrSym{T,M} = Union{Hermitian{T,M}, Symmetric{T,M}}
export AbstractToeplitz, Toeplitz, SymmetricToeplitz, Circulant, LowerTriangularToeplitz, UpperTriangularToeplitz, TriangularToeplitz, Hankel
export durbin, trench, levinson

@static if isdefined(Base, :require_one_based_indexing)
const require_one_based_indexing = Base.require_one_based_indexing
else
function require_one_based_indexing(A...)
!Base.has_offset_axes(A...) || throw(ArgumentError("offset arrays are not supported but got an array with index other than 1"))
end
end

include("iterativeLinearSolvers.jl")

# Abstract
Expand Down

0 comments on commit dd6d811

Please sign in to comment.