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

Update base/linalg_lapack.jl #1285

Closed
wants to merge 1 commit into from
Closed

Update base/linalg_lapack.jl #1285

wants to merge 1 commit into from

Conversation

andreasnoack
Copy link
Member

Fixes a BoundsError() when solving a system AX=B where B has more than one column but less columns than A.

Fixes a BoundsError() when solving a system AX=B where B has more than one column but less columns than A.
@pao
Copy link
Member

pao commented Sep 17, 2012

#1281 is eliminating this file and moving the code to a new file. /cc @dmbates so we don't lose track of this.

@dmbates dmbates mentioned this pull request Sep 19, 2012
@dmbates
Copy link
Member

dmbates commented Sep 19, 2012

That particular problem is fixed with commit 9f18c27 but I still managed to get other things wrong.

julia> A = hcat(ones(Int, (20,1)), randn(20,3))
20x4 Float64 Array:
 1.0   0.619081    0.404256   -2.67521   
 1.0   1.53191    -0.0808217   1.59935   
 1.0   0.943053    0.399352    0.999465  
 1.0   0.856869   -1.11556    -0.650456  
 1.0  -2.02785    -1.38463    -1.30898   
 1.0  -1.88343     0.392249    0.00216758
 1.0   0.410346   -0.380736   -0.399839  
 1.0  -0.321703    0.806686    0.0868557 
 1.0  -0.231512    2.57094    -0.513419  
 1.0  -0.0277049   1.11686    -0.951766  
 1.0  -0.362643   -0.584142   -0.139476  
 1.0  -0.293289    0.900996   -0.723704  
 1.0   0.368721    1.24072     0.257587  
 1.0  -0.385336   -0.650678    0.138635  
 1.0   1.1719      3.78649     1.89639   
 1.0   0.0513328  -0.719821    0.399134  
 1.0  -0.574667   -1.07253    -1.60588   
 1.0  -0.0457362  -0.816301    0.520239  
 1.0  -0.356147   -1.87127    -0.30319   
 1.0  -0.396575   -0.213875    1.24382   

julia> B = rand(20,2)
20x2 Float64 Array:
 0.846606    0.98715  
 0.418574    0.538726 
 0.0658084   0.412714 
 0.750744    0.0361259
 0.959699    0.565081 
 0.378211    0.403123 
 0.00342535  0.854973 
 0.581534    0.738919 
 0.326259    0.13519  
 0.154789    0.834684 
 0.377152    0.797917 
 0.0299049   0.217196 
 0.0347649   0.822839 
 0.162089    0.95891  
 0.163272    0.294578 
 0.870526    0.721911 
 0.996131    0.297861 
 0.656316    0.682511 
 0.730336    0.200838 
 0.122441    0.496537 

julia> A\B
4-element Float64 Array:
  0.434433  
 -0.00116398
 -0.106834  
 -0.1082    

Another commit coming up.

@ViralBShah
Copy link
Member

Need to merge this in the latest master, with the refactored linalg code.

@andreasnoack
Copy link
Member Author

Lets close this one down as the problem has been solved in the new commit.

@dmbates There was a missing colon in gels!. I have made a pull request that adds it.
#1293

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

Successfully merging this pull request may close these issues.

4 participants