JuliaMath / JuliaMath/FastChebInterp.jl
Support for custom types?
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Julia
- Stars
- 83
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
Can this package handle custom types in a Hilbert space?
import Base: +, *
struct Foo
x::Float64
y::Float64
end
+(f1::Foo, f2::Foo) = Foo(f1.x + f2.x, f1.y + f2.y)
*(a::Real, f::Foo) = Foo(a * f.x, a * f.y)
g(x) = Foo(x[1], x[2])
lb, ub = [1,3], [2, 4]
x = chebpoints((10,20), lb, ub)
c = chebinterp(g.(x), lb, ub)
ERROR: MethodError: no method matching zero(::Type{Any})
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 reproducing the Julia example using the custom Foo type, focusing on the chebpoints and chebinterp entry points named in the issue. Trace the path that produces zero(::Type{Any}); done means the example supports custom types in this Hilbert-space use case without that MethodError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100