Skip to content

stride behaves differently on subarrays and arrays #4412

Closed
@dmbates

Description

@dmbates

I encountered this when solving a linear system of equations using LAPACK. Functions like Base.LinAlg.LAPACK.potrs! evaluate stride(B,2) where B is the right hand side. If B is, say, an Array{Float64,1}, this evaluates tolength(B)but ifBis aSubArray{Float64,1}it throws aBoundsError`.

I feel the best thing to do is to change the stride method for SubArray to match the behavior of that for Array but I guess we could instead change the logic in the LAPACK functions.

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