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

Sparse matrix problem when trying to creating a BasisMatrix object #65

Open
zlqs1985 opened this issue Sep 27, 2023 · 0 comments
Open

Comments

@zlqs1985
Copy link

Argument error:illegal buffers for sparsematrixcsc when creating a BasisMatrix object

julia> versioninfo() Julia Version 1.8.5 Commit 17cfb8e65e (2023-01-08 06:45 UTC) Platform Info: OS: Windows (x86_64-w64-mingw32) CPU: 8 × Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-13.0.1 (ORCJIT, skylake) Threads: 1 on 8 virtual cores Environment: JULIA_PKG_SERVER = https://mirrors.bfsu.edu.cn/julia JULIA_EDITOR = code JULIA_NUM_THREADS =

When trying to replicate the example in the demo example, I got

`ArgumentError: Illegal buffers for SparseMatrixCSC construction 270
Stacktrace:
[1] SparseMatrixCSC
@ C:\Users\lenovo\AppData\Local\Programs\Julia-1.8.5\share\julia\stdlib\v1.8\SparseArrays\src\sparsematrix.jl:29 [inlined]
[2] SparseArrays.SparseMatrixCSC(m::Int64, n::Int64, colptr::Vector{Int64}, rowval::Vector{Int64}, nzval::Vector{Float64})
@ SparseArrays C:\Users\lenovo\AppData\Local\Programs\Julia-1.8.5\share\julia\stdlib\v1.8\SparseArrays\src\sparsematrix.jl:44
[3] _allocate_row_kron_out(#unused#::Type{SparseArrays.SparseMatrixCSC}, A::Matrix{Float64}, B::SparseArrays.SparseMatrixCSC{Float64, Int64})
@ BasisMatrices C:\Users\lenovo.julia\packages\BasisMatrices\PZ1uM\src\util.jl:625
[4] _allocate_row_kron_out
@ C:\Users\lenovo.julia\packages\BasisMatrices\PZ1uM\src\util.jl:643 [inlined]
[5] row_kron(A::Matrix{Float64}, B::SparseArrays.SparseMatrixCSC{Float64, Int64})
@ BasisMatrices C:\Users\lenovo.julia\packages\BasisMatrices\PZ1uM\src\util.jl:33
[6] convert(::Type{Expanded}, bs::BasisMatrix{Direct, AbstractMatrix{Float64}}, order::Matrix{Int64})
@ BasisMatrices C:\Users\lenovo.julia\packages\BasisMatrices\PZ1uM\src\basis_structure.jl:149
[7] BasisMatrix
@ C:\Users\lenovo.julia\packages\BasisMatrices\PZ1uM\src\basis_structure.jl:246 [inlined]
[8] BasisMatrix(basis::Basis{2, Tuple{SplineParams{Vector{Float64}}, ChebParams{Float64}}}, tbm::Expanded, x::Matrix{Float64}, order::Int64)
@ BasisMatrices C:\Users\lenovo.julia\packages\BasisMatrices\PZ1uM\src\basis_structure.jl:304
[9] top-level scope
@ c:\Users\lenovo\Documents\Julia\NumericalMethods\jupyter-notebooks\BasisMatrices_demo.ipynb:1
UndefVarError: Φ not defined

Stacktrace:
[1] top-level scope
@ c:\Users\lenovo\Documents\Julia\NumericalMethods\jupyter-notebooks\BasisMatrices_demo.ipynb:6
UndefVarError: c not defined

Stacktrace:
[1] top-level scope
@ c:\Users\lenovo\Documents\Julia\NumericalMethods\jupyter-notebooks\BasisMatrices_demo.ipynb:7`

How could I fix this problem, Thank you.

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

1 participant