[SciPy-User] maping a float to a function value

nicky van foreest vanforeest@gmail....
Wed Dec 9 15:57:58 CST 2009


> The question is: why do you want to use floats as keys in a dictionary?
>

One argument is that I like it conceptually.  The technical argument
is as follows. I need the (numerical) solution of the  integral
equation

gamma(x) = c(x) + \int_0^\infty gamma(x-y) G(y) dy,

for given functions c(x) and G(x). (There are some technical
conditions on G and c such that I can prove that the integral equation
has a solution.)  Now I like to store the values gamma(x) as keys of
x, as it feels natural. Moreover, I need gamma in a second integral
equation. Sure I can store gamma as an array, but then I have to
convert the index i to the key x, and I dislike this, as it is less
elegant, and requires extra code.

I hope the above clarifies my point, but I am not quite sure...

Nicky


More information about the SciPy-User mailing list