Skip to content

Support Array Slicing #33

@lstagner

Description

@lstagner

I got bit by this yesterday. The solution is to write a custom getindex(A,I...) method but I am unsure about how to do that generically.

julia> x = Zeros(3,3)
3×3 Zeros{Float64,2,Tuple{Int64,Int64}}:
 0.0  0.0  0.0
 0.0  0.0  0.0
 0.0  0.0  0.0

julia> x[:,1]
3-element Array{Float64,1}:
 0.0
 0.0
 0.0

julia> x[1:3,1]
3-element Array{Float64,1}:
 0.0
 0.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