From c794417cdda8987cd9f930d7e0ca9eb10e9a1708 Mon Sep 17 00:00:00 2001 From: Jishnu Bhattacharya Date: Thu, 14 Dec 2023 16:33:09 +0530 Subject: [PATCH] Remove permutedims specialization for Diagonal (#151) * Remove permutedims specialization for Diagonal * Limit method to older Julia versions --- src/infrange.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/infrange.jl b/src/infrange.jl index beb292e..75fb935 100644 --- a/src/infrange.jl +++ b/src/infrange.jl @@ -574,8 +574,9 @@ end FillArrays._range_convert(::Type{AbstractVector{T}}, r::InfRanges) where T = convert(AbstractVector{T}, r) - -permutedims(D::Diagonal{<:Any,<:InfRanges}) = D +if VERSION <= v"1.9" + permutedims(D::Diagonal{<:Any,<:InfRanges}) = D +end copy(D::Diagonal{<:Any,<:InfRanges}) = D broadcasted(::LazyArrayStyle{2}, ::typeof(*), a::Number, D::Diagonal{<:Any,<:InfRanges}) = a*D broadcasted(::LazyArrayStyle{2}, ::typeof(*), D::Diagonal{<:Any,<:InfRanges}, a::Number) = D*a