Skip to content

Interpolation over "flat" dimensions #107

@nilshg

Description

@nilshg

Not sure whether this is an issue or not (there may well be theoretical reasons for why the current state is correct!), but I'm currently interpolating a multidimensional object linearly within a loop, with grids changing in each iteration. In some iterations, the grid can in certain dimensions become "flat", i.e. just a vector containing repeats of the same value. In this case, Interpolations.jl returns NaNs, which at least to me came as a surprise.

When collapsing the grid down to one point (I inserted a line saying (std(gridvals)>0.1) || (gridpoints=1)), an error is raised that dimensions of length 1 are not (yet) supported - is this something that will happen sometime soon? And might it be worthwhile to raise an error if the grid is flat as well, rather than returning NaNs silently, which might be harder to debug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions