Comments (7)
julia> using SparseArrays
julia> sparse(A)
6×6 SparseMatrixCSC{Float64, Int64} with 12 stored entries:
2.0 5.0 5.0 ⋅ ⋅ ⋅
2.0 5.0 5.0 ⋅ ⋅ ⋅
2.0 5.0 5.0 ⋅ ⋅ ⋅
⋅ ⋅ ⋅ 8.0 ⋅ ⋅
⋅ ⋅ ⋅ ⋅ 8.0 ⋅
⋅ ⋅ ⋅ ⋅ ⋅ 8.0
julia> sparse(A) |> bandwidths
(2, 2)
Why are you expecting (3,3)
btw?
from bandedmatrices.jl.
yeah, I agree it must be (2, 2) not (3,3).
It is working for SparseArray
type but not with dense matrices as I have mentioned in the question.
I am not sure, if it is intentionally designed to work in that way for any advantage.
I confirm the same behavior with the new version of the package.
from bandedmatrices.jl.
bandwidths
should be “fast”. Checking every entry is an O(n^2)
operation
from bandedmatrices.jl.
How can you get the bandwidths
of a dense matrix without checking for the zeros?
from bandedmatrices.jl.
bandwidths
is about structural zeros not actual zeros. So you just assume it’s full
from bandedmatrices.jl.
Maybe it needs info in the docs because, for example, rank of a dense matrix is slow, based on svdvals, but it could have been "generically" full. Contrast that to rank of a LowRankMatrix which is fast and structural by the type.
from bandedmatrices.jl.
If you make a PR to the docs I’ll merge it
from bandedmatrices.jl.
Related Issues (20)
- versioned document is not deployed HOT 1
- Feature request: convenience functions to construct types equivalent to those from LinearAlgebra HOT 1
- In-place assignment on subviews of bands HOT 1
- Products and inverses of symmetric banded matrices HOT 2
- LU decomposition HOT 4
- Docs 404 HOT 1
- Matrix-vector product with a transposed/adjoint `BandedMatrix` is slow
- Stable docs not building HOT 8
- `Adjoint`/`Transpose` don't define `bandeddata` HOT 4
- Tag v1.0
- Why is `BandedMatrix` mutable? HOT 4
- Matrix-Matrix product is slow with diagonal banded matrices HOT 4
- Is the type parameter `<:` intentional? HOT 1
- getindex for BandedEigenvalues is extremely slow HOT 2
- setindex with ranges is broken
- `isbanded` should not be exported
- lu(A) is not banded HOT 6
- When to use BandedMatrices over static arrays? HOT 2
- \(::SparseMatrixCSC{Float64, Int64}, ::BandedMatrix{Float64, Matrix{Float64}, Base.OneTo{Int64}}) is ambiguous.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bandedmatrices.jl.