stride behaves differently on subarrays and arrays #4412

Closed
dmbates opened this Issue Oct 1, 2013 · 1 comment

Comments

Projects
None yet
2 participants
Member

dmbates commented Oct 1, 2013

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.

Owner

timholy commented Oct 2, 2013

Agreed. I'd noticed this myself, but didn't get around to fixing it. Given the impending 0.2 release, I've done this as a PR: #4416.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment