Skip to content

Handling zero sized blocks in assignment with broadcast and operation on self #444

Description

@krcools

This looks like it might be related to #203 , but I am reporting this for completeness. Assignment in combination with broadcasting does not handle zero-sized blocks correctly:

julia> y = BlockedArray([2.0, 3.0], [1,0,1])
3-blocked 2-element BlockedVector{Float64}:
 2.0
 ───
 3.0

julia> z = y .+ 100.0  # correct result
3-blocked 2-element BlockedVector{Float64}:
 102.0
 ─────
 103.0

julia> y .+= 100.0 # second block is not acted upon
3-blocked 2-element BlockedVector{Float64}:
 102.0
 ─────
   3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions