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

Convenience methods for CartesianIndices? #18

Open
tlnagy opened this issue Mar 1, 2020 · 1 comment
Open

Convenience methods for CartesianIndices? #18

tlnagy opened this issue Mar 1, 2020 · 1 comment

Comments

@tlnagy
Copy link

tlnagy commented Mar 1, 2020

I find myself running something like the following a lot:

sample_points = collect(hcat([[point.I...] for point in findall(outline)]...));
eval_points = collect(hcat([[point.I...] for point in findall(hole)]...));

itp = interpolate(Shepard(), sample_points, data[findall(outline)]))
vals = ScatteredInterpolation.evaluate(itp, eval_points)

What do you think about adding support for CartesianIndices so that collections of them can be passed directly to interpolate and evaluate?




Also thanks for the great package! I'm really happy to not have call out to Python to do scattered interpolations any more.

@eljungsk
Copy link
Owner

eljungsk commented Mar 8, 2020

Hi,

Thanks for the feedback!

I'm not fully sure that I understand your use case. If you have a collection I of CartesianIndex into an AbstractArray A, don't you get an Array that you can use as input to interpolate and evaluate by doing A[I]?

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