Now you should probably be using Interpolations.jl.

--Tim

On Wednesday, January 20, 2016 05:35:53 PM [email protected] 
wrote:
> Cant get it to work, maybe i'm not understanding something. Can you help me?
> On Julia V 4.0.2:
> 
> AltInterp =
> 
> > CoordInterpGrid(Znw,squeeze(Altura_segun_corte[xx,yy,:],(1,2)),BCnil,Inter
> > pLinear);
> throws:
> > ERROR: LoadError: MethodError: `convert` has no method matching
> > convert(::Type{Grid.CoordInterpGrid{T<:AbstractFloat,N,BC<:Grid.BoundaryCo
> > ndition,IT<:Grid.InterpType,R}},> 
> > ::Array{Float64,1}, ::Array{Float64,1}, ::Type{Grid.BCnil},
> > ::Type{Grid.InterpLinear})
> > 
> > This may have arisen from a call to the constructor
> > Grid.CoordInterpGrid{T<:AbstractFloat,N,BC<:Grid.BoundaryCondition,IT<:Gri
> > d.InterpType,R}(...), since type constructors fall back to convert
> > methods.
> > 
> > Closest candidates are:
> >   Grid.CoordInterpGrid{N,T<:AbstractFloat}(::NTuple{N,Range{T}},
> >   
> > ::Array{T<:AbstractFloat,N}, ::Any...)
> > ::
> >   Grid.CoordInterpGrid{R<:Range{T},T<:AbstractFloat}(::R<:Range{T},
> >   
> > ::Array{T<:AbstractFloat,1}, ::Any...)
> > ::
> >   call{T}(::Type{T}, ::Any)
> >   ...
> >  
> >  in call at essentials.jl:57
> >  [inlined code] from Cortes_horizontales_U_V_mod2.jl:46
> >  in anonymous at no file:0
> >  in include at ./boot.jl:261
> >  in include_from_node1 at ./loading.jl:304
> > 
> > while loading Cortes_horizontales_U_V_mod2.jl, in expression starting on
> > line 42
> 
> I can't understand nothing from this error message! my variables in here
> 
> are:
> >  julia> typeof(Znw)
> > 
> > Array{Float64,1}
> > 
> > julia> typeof(squeeze(Altura_segun_corte[1,1,:],(1,2)))
> > Array{Float64,1}
> > 
> > julia> sizeof(Znw)
> > 224
> > 
> > julia> sizeof(squeeze(Altura_segun_corte[1,1,:],(1,2)))
> > 224
> > 
> > What would the problem be?
> 
> El sábado, 19 de abril de 2014, 11:06:30 (UTC-5), Simon Byrne escribió:
> > I actually wanted this functionality myself. See
> > https://github.com/timholy/Grid.jl/pull/14
> > 
> > On Thursday, 17 April 2014 13:26:57 UTC+1, Tim Holy wrote:
> >> That's fine. That's how it always works; things happen in Julia when
> >> someone
> >> finds the time to do them.
> >> 
> >> --Tim
> >> 
> >> On Wednesday, April 16, 2014 10:07:46 PM Spencer Lyon wrote:
> >> > I'd love to beef up this wrapper type and add it to grid, but
> >> 
> >> unfortunately
> >> 
> >> > I wont' be able to get to it for a while -- probably late June.
> >> > 
> >> > On Tuesday, April 15, 2014 9:06:57 AM UTC-4, Tim Holy wrote:
> >> > > On Tuesday, April 15, 2014 05:35:27 AM Spencer Lyon wrote:
> >> > > > It seems to me that this would be fairly standard functionality. I
> >> 
> >> am
> >> 
> >> > > sure
> >> > > 
> >> > > > there is a benefit to having the default getindex methods deal in
> >> 
> >> “index
> >> 
> >> > > > units” instead of physical ones, but I can’t tell what that benefit
> >> 
> >> is?
> >> 
> >> > > Is
> >> > > 
> >> > > > there a reason you chose to have it set up the way it is?
> >> > > 
> >> > > When physical units = indexing units, you save one multiply and one
> >> 
> >> add on
> >> 
> >> > > each interpolation operation. So it's best to implement the base
> >> 
> >> operation
> >> 
> >> > > "minimally," and add wrapper types that require more operations
> >> 
> >> around it.
> >> 
> >> > > I've not personally ever needed anything else (I mostly do
> >> 
> >> interpolation
> >> 
> >> > > on
> >> > > images), and no one else has added it to Grid, either.
> >> > > 
> >> > > If you wanted to add your wrapper type to Grid, I think that would be
> >> > > great.
> >> > > Some additional things to think about:
> >> > > - Derivatives (here, the chain rule is your friend)
> >> > > - Dimensions higher than 1
> >> > > - It's no longer just a shift, it's also scaled, so a name change
> >> 
> >> might be
> >> 
> >> > > in
> >> > > order.
> >> > > 
> >> > > --Tim

Reply via email to