Skip to content

Unary and binary operators on SArray do not return SArray in Julia 0.7 #272

@wsshin

Description

@wsshin

Not sure what changes in 0.7 caused this, but unary operators on SArrays no longer give SArarys:

julia> VERSION
v"0.7.0-DEV.1283"

julia> v = SVector(1,2,3);

julia> -v
3-element Array{Int64,1}:
 -1
 -2
 -3

Neither do binary operators:

julia> v-v
3-element Array{Int64,1}:
 0
 0
 0

Element-wise binary operators seem to be returning SArrays correctly:

julia> v.-v
3-element SVector{3,Int64}:
 0
 0
 0

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