Skip to content

Commit

Permalink
Fix similar
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHnt committed Jan 25, 2025
1 parent 0f33fa4 commit 8b0c1f2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/matmul.jl
Original file line number Diff line number Diff line change
Expand Up @@ -152,23 +152,23 @@ matmul_mode() = MatMulMode{:slow}()
Base.similar(a::Array{Interval{T},1}) where {T<:NumTypes} = zeros(Interval{T}, size(a, 1))
Base.similar(a::Array{Complex{Interval{T}},1}) where {T<:NumTypes} = zeros(Complex{Interval{T}}, size(a, 1))

Base.similar(a::Array{Interval{T},1}, S::Type) where {T<:NumTypes} = zeros(S, size(a, 1))
Base.similar(a::Array{Complex{Interval{T}},1}, S::Type) where {T<:NumTypes} = zeros(S, size(a, 1))
Base.similar(a::Array{<:Any,1}, S::Type{Interval{T}}) where {T<:NumTypes} = zeros(S, size(a, 1))
Base.similar(a::Array{<:Any,1}, S::Type{Complex{Interval{T}}}) where {T<:NumTypes} = zeros(S, size(a, 1))

Base.similar(a::Array{Interval{T},2}) where {T<:NumTypes} = zeros(Interval{T}, size(a, 1), size(a, 2))
Base.similar(a::Array{Complex{Interval{T}},2}) where {T<:NumTypes} = zeros(Complex{Interval{T}}, size(a, 1), size(a, 2))

Base.similar(a::Array{Interval{T},2}, S::Type) where {T<:NumTypes} = zeros(S, size(a, 1), size(a, 2))
Base.similar(a::Array{Complex{Interval{T}},2}, S::Type) where {T<:NumTypes} = zeros(S, size(a, 1), size(a, 2))
Base.similar(a::Array{<:Any,2}, S::Type{Interval{T}}) where {T<:NumTypes} = zeros(S, size(a, 1), size(a, 2))
Base.similar(a::Array{<:Any,2}, S::Type{Complex{Interval{T}}}) where {T<:NumTypes} = zeros(S, size(a, 1), size(a, 2))

Base.similar(::Array{Interval{T}}, m::Int) where {T<:NumTypes} = zeros(Interval{T}, m)
Base.similar(::Array{Complex{Interval{T}}}, m::Int) where {T<:NumTypes} = zeros(Complex{Interval{T}}, m)

Base.similar(::Array{Interval{T}}, dims::Dims) where {T<:NumTypes} = zeros(Interval{T}, dims)
Base.similar(::Array{Complex{Interval{T}}}, dims::Dims) where {T<:NumTypes} = zeros(Complex{Interval{T}}, dims)

Base.similar(::Array{Interval{T}}, S::Type, dims::Dims) where {T<:NumTypes} = zeros(S, dims)
Base.similar(::Array{Complex{Interval{T}}}, S::Type, dims::Dims) where {T<:NumTypes} = zeros(S, dims)
Base.similar(::Array, S::Type{Interval{T}}, dims::Dims) where {T<:NumTypes} = zeros(S, dims)
Base.similar(::Array, S::Type{Complex{Interval{T}}}, dims::Dims) where {T<:NumTypes} = zeros(S, dims)
#

function LinearAlgebra.mul!(C::AbstractVecOrMat{<:RealOrComplexI}, A::AbstractMatrix{<:RealOrComplexI}, B::AbstractVecOrMat{<:RealOrComplexI})
Expand Down

0 comments on commit 8b0c1f2

Please sign in to comment.