QuantEcon / QuantEcon/BasisMatrices.jl
Spline derivatives issue
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 33
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
using BasisMatrices
x = linspace(0.0, 5.0, 25)
p = SplineParams(x, 0, 3)
itp = BasisMatrices.Interpoland(Basis(p), [nodes(p).^2 nodes(p).^3])
pts = [1.0, 2.0, 3.0]
println(itp(1.0, reshape([0, 1], (2, 1))))
println(itp(1.0, reshape([0, 1], (1, 2))))
println(itp(1.0, reshape([1], (1, 1))))
The first print command should give the level and first derivative of the two functions
The second print command should compute df(x)/dy and should fail because there isn't a second dimension to take a derivative with respect to.
The third print command reacts as expected.
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 by running the Julia reproduction using SplineParams, Basis, and BasisMatrices.Interpoland, comparing the three reshape cases with the expected derivative behavior. Trace the interpolation and derivative entry points involved in those calls; done means the first and third calls behave as described and the second call fails because no second dimension exists.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100