Skip to content

Commit

Permalink
Make sure container type is maintained in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty committed Nov 29, 2024
1 parent 19b5ac3 commit d626fad
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
@@ -1,6 +1,6 @@
name = "BandedMatrices"
uuid = "aae01518-5342-5314-be14-df237901396f"
version = "1.7.5"
version = "1.7.6"

[deps]
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
Expand Down
2 changes: 1 addition & 1 deletion src/banded/BandedMatrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ BandedMatrix{T, C}(::UndefInitializer, (n,m)::NTuple{2,Integer}, (a,b)::NTuple{2
BandedMatrix{T, C}(::UndefInitializer, (n,m)::NTuple{2,Integer}, (a,b)::NTuple{2,Integer}) where {T, C<:AbstractMatrix{T}} =
_BandedMatrix(C(undef,max(0,b+a+1),m),n,a,b)
BandedMatrix{T, C}(::UndefInitializer, (n,m)::NTuple{2,Integer}, (a,b)::NTuple{2,Integer}) where {T<:Number, C<:AbstractMatrix{T}} =
_BandedMatrix(fill!(similar(C, max(0,b+a+1),m), zero(T)),n,a,b)
_BandedMatrix(fill!(convert(C, similar(C, max(0,b+a+1),m)), zero(T)),n,a,b)

BandedMatrix{T}(::UndefInitializer, nm::NTuple{2,Integer}, ab::NTuple{2,Integer}) where T =
BandedMatrix{T, Matrix{T}}(undef,nm,ab)
Expand Down

0 comments on commit d626fad

Please sign in to comment.