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

Documentation: what exactly is meant by "irregular grid"? #558

Open
scheidan opened this issue Jul 20, 2023 · 1 comment
Open

Documentation: what exactly is meant by "irregular grid"? #558

scheidan opened this issue Jul 20, 2023 · 1 comment

Comments

@scheidan
Copy link

Maybe this is just a problem of wording

The Readme and the documentation tells me that "Currently this package supports [...] irregular grids."
I interpreted this (wrongly as it turns out) that I can interpolate points arbitrarily scattered. It seems I'm not alone with this: this issue #552 clarifies that "irregular" means "rectilinear", and not arbitrary irregular.

Writing explicitly:
"Currently this package supports interpolation on Cartesian and rectilinear grids"
would have helped a lot.

For reference:
Wikipedia for Regular grids
Wikipedia for Unstructured grid or irregular grid

@scheidan scheidan changed the title Documentation: what is exactly meant with "irregular grid"? Documentation: what exactly is meant by "irregular grid"? Jul 20, 2023
@sob727
Copy link

sob727 commented Aug 4, 2023

Unclear to me what is supported. On v0.14.7 this happens:

julia> cubic_spline_interpolation([1,2,5],[4,2,4])
ERROR: MethodError: no method matching cubic_spline_interpolation(::Vector{Int64}, ::Vector{Int64})

Closest candidates are:
  cubic_spline_interpolation(::AbstractRange, ::AbstractVector; bc, extrapolation_bc)
   @ Interpolations ~/.julia/packages/Interpolations/nDwIa/src/convenience-constructors.jl:12
  cubic_spline_interpolation(::Tuple{Vararg{AbstractRange, N}}, ::AbstractArray{T, N}; bc, extrapolation_bc) where {N, T}
   @ Interpolations ~/.julia/packages/Interpolations/nDwIa/src/convenience-constructors.jl:29

Stacktrace:
 [1] top-level scope
   @ REPL[17]:1

julia> linear_interpolation([1,2,5],[4,2,4])
3-element extrapolate(interpolate((::Vector{Int64},), ::Vector{Int64}, Gridded(Linear())), Throw()) with element type Float64:
 Ratios.SimpleRatio{Int64}(4, 1)
 Ratios.SimpleRatio{Int64}(2, 1)
 Ratios.SimpleRatio{Int64}(12, 3)

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

2 participants