Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stride behaves differently on subarrays and arrays #4412

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

stride behaves differently on subarrays and arrays #4412

dmbates opened this issue Oct 1, 2013 · 1 comment

Comments

@dmbates
Copy link
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.

@timholy
Copy link
Member

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants