Skip to content

Scalar multiplication may not preserve bandwidths #476

Open
@jishnub

Description

@jishnub
julia> B = brand(Complex{Int8}, 3,3, 5,5)
3×3 BandedMatrix{Complex{Int8}} with bandwidths (5, 5):
 -57-25im     0-61im   18-6im
 -94-43im   102+18im  106-40im
 110+26im  -114+15im   75-50im

julia> C = 1*B
3×3 BandedMatrix{Complex{Int64}} with bandwidths (2, 2):
 -57-25im     0-61im   18-6im
 -94-43im   102+18im  106-40im
 110+26im  -114+15im   75-50im

While the allocation is lower if there are fewer bands, altering the bandwidths makes it harder to loop over the bands. If the user has specified empty bands, perhaps these should be preserved at the expense of allocations?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions