timholy / Grid.jl

Interpolation and related operations on grids
MIT License
47 stars 26 forks source link

Array Input support for CoordInterpGrid #71

Closed bluehope closed 8 years ago

bluehope commented 8 years ago

Is CoordInterpGrid could be modified to support array input? Below example gives error

x = sort(collect([-1.0:0.1:1.0;2:0.01:3]))
y = collect( 2.0:0.5:10.0)
z_2d = Float64[sin(i+j) for i in x, j in y]

z_2di = CoordInterpGrid((x,y), z_2d, BCnil, InterpQuadratic);

while this works.

x = [-1.0:0.1:1.0;2:0.01:3]
y = 2.0:0.5:10.0
z_2d = Float64[sin(i+j) for i in x, j in y]

z_2di = CoordInterpGrid((x,y), z_2d, BCnil, InterpQuadratic);

Coordinates would not be always range type if we do some fitting from experimental data. I hope CoordInterpGrid to support range or is there some other way?

tomasaschan commented 8 years ago

This package is deprecated in favor of Interpolations.jl; no new development is likely to happen on this package (it will in fact not be installable on Julia 0.6).

Interpolations.jl requires Julia 0.4 or higher, but the functionality you want is supported.