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

lufact for sparse matrix pivot option error #18244

Closed
garrettthomaskth opened this issue Aug 25, 2016 · 2 comments
Closed

lufact for sparse matrix pivot option error #18244

garrettthomaskth opened this issue Aug 25, 2016 · 2 comments
Labels
linear algebra Linear algebra

Comments

@garrettthomaskth
Copy link
Contributor

base/sparse/umfpack.jl includes the following method definition for lufact

lufact(A::SparseMatrixCSC, pivot::Type{Val{false}}) = lufact(A)

This should likely be

lufact(A::SparseMatrixCSC, pivot::Type{Val{true}}) = lufact(A)

because in lufact pivoting is on by default.

The error is shown in the following example

A = speye(4)
A[1:2,1:2] = [-.01 -200; 200 .001]
F = lufact(A,Val{false})
F[:p]

which returns

julia> F[:q]
4-element Array{Int64,1}:
 3
 4
 1
 2

However it should return

julia> F[:q]
4-element Array{Int64,1}:
1
2
3
4

because pivoting was turned off.

@jiahao jiahao added the linear algebra Linear algebra label Aug 25, 2016
@jiahao
Copy link
Member

jiahao commented Aug 25, 2016

Thanks for reporting the bug. Could you submit a PR?

andreasnoack pushed a commit that referenced this issue Aug 29, 2016
* lufact for sparse matrix pivot option error

base/sparse/umfpack.jl includes the following method definition for lufact

`lufact(A::SparseMatrixCSC, pivot::Type{Val{false}}) = lufact(A)`

This should likely be

`lufact(A::SparseMatrixCSC, pivot::Type{Val{true}}) = lufact(A)`

because in lufact pivoting is on by default.

The error is shown in the following example

```
A = speye(4)
A[1:2,1:2] = [-.01 -200; 200 .001]
F = lufact(A,Val{false})
F[:p]
```
which returns
```
julia> F[:q]
4-element Array{Int64,1}:
 3
 4
 1
 2
```
However it should return
```
julia> F[:q]
4-element Array{Int64,1}:
1
2
3
4
```
because pivoting was turned off.

* Added test for #18246 and #18244

* 4 space indent

oops my bad

* remove unnecessary lufact method

* update test for removed lufact method definition
@andreasnoack
Copy link
Member

Fixed by #18246

mfasi pushed a commit to mfasi/julia that referenced this issue Sep 5, 2016
* lufact for sparse matrix pivot option error

base/sparse/umfpack.jl includes the following method definition for lufact

`lufact(A::SparseMatrixCSC, pivot::Type{Val{false}}) = lufact(A)`

This should likely be

`lufact(A::SparseMatrixCSC, pivot::Type{Val{true}}) = lufact(A)`

because in lufact pivoting is on by default.

The error is shown in the following example

```
A = speye(4)
A[1:2,1:2] = [-.01 -200; 200 .001]
F = lufact(A,Val{false})
F[:p]
```
which returns
```
julia> F[:q]
4-element Array{Int64,1}:
 3
 4
 1
 2
```
However it should return
```
julia> F[:q]
4-element Array{Int64,1}:
1
2
3
4
```
because pivoting was turned off.

* Added test for JuliaLang#18246 and JuliaLang#18244

* 4 space indent

oops my bad

* remove unnecessary lufact method

* update test for removed lufact method definition
tkelman pushed a commit that referenced this issue Feb 22, 2017
* lufact for sparse matrix pivot option error

base/sparse/umfpack.jl includes the following method definition for lufact

`lufact(A::SparseMatrixCSC, pivot::Type{Val{false}}) = lufact(A)`

This should likely be

`lufact(A::SparseMatrixCSC, pivot::Type{Val{true}}) = lufact(A)`

because in lufact pivoting is on by default.

The error is shown in the following example

```
A = speye(4)
A[1:2,1:2] = [-.01 -200; 200 .001]
F = lufact(A,Val{false})
F[:p]
```
which returns
```
julia> F[:q]
4-element Array{Int64,1}:
 3
 4
 1
 2
```
However it should return
```
julia> F[:q]
4-element Array{Int64,1}:
1
2
3
4
```
because pivoting was turned off.

* Added test for #18246 and #18244

* 4 space indent

oops my bad

* remove unnecessary lufact method

* update test for removed lufact method definition

(cherry picked from commit 68d3d32)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear algebra Linear algebra
Projects
None yet
Development

No branches or pull requests

3 participants