# Can I define a function from a list of values?

Hello,

I am doing numerical integration. If I define the resulting function as a list of values, I have to keep track of both the number of values and the distance between them. This also makes showing the domain on a plot more annoying. Could I instead define a function object from the list of values? In other words, I need an array whose index is not necessarily integer. And I need to be able to plot it over a range.

Thanks!

Could you be more specific? Are the points uniformly spaced? Do you need to interpolate the values of the function? If you use floats for indices in, say, a dictionary, rounding errors will cause trouble, so I don't see how you could use non-integer indices...