QuantEcon / QuantEcon/BasisMatrices.jl
simple BasisMatrix call doesn't work
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 33
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
hi,
i was trying to replicate the example on the readme:
grid1 = linspace(1,3,10)
sp = SplineParams(collect(grid1),0,3) # nodes, whether only 2 nodes, degree of spline
sb = Basis(sp)
s,n = nodes(sb)
B = BasisMatrix(sb)
ERROR: MethodError: Cannot `convert` an object of type BasisMatrices.Basis{1,Tuple{BasisMatrices.SplineParams{Array{Float64,1}}}} to an object of type BasisMatrices.BasisMatrix
This may have arisen from a call to the constructor BasisMatrices.BasisMatrix(...),
since type constructors fall back to convert methods.
Stacktrace:
[1] BasisMatrices.BasisMatrix(::BasisMatrices.Basis{1,Tuple{BasisMatrices.SplineParams{Array{Float64,1}}}}) at ./sysimg.jl:24
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the README example and the BasisMatrix(sb) call that produces the MethodError. Trace the BasisMatrix constructor or conversion for the Basis object shown in the stack trace, then verify that the example completes without this error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100